SYP-I18N-004 · v1.3.0 · Published
Hard-coded storefront route
Detects storefront links that use a fixed path where a Shopify locale-aware route object is expected.
Description
Detects storefront links that use a fixed path where a Shopify locale-aware route object is expected.
Why it matters
A fixed storefront path can send a customer back to the default locale or bypass route behavior managed by Shopify.
Detection
The Runtime inspects supported link attributes in Liquid templates and checks whether a recognized storefront path is hard-coded instead of being produced by a Shopify route object.
Does not match
- Links already produced by a supported Shopify routes object
- Relative anchors, external URLs and paths outside the rule’s recognized storefront-route set
- Dynamic routing whose final value cannot be established statically
Evidence
- Affected Liquid file and exact source location
- The hard-coded href value
- The applicable route pattern and rule version
Validation
The candidate is accepted when the Runtime confirms a literal recognized storefront path in a supported navigational attribute and no locale-aware route object produces that value.
Examples
<a href="/collections/all">Shop all</a><a href="{{ routes.all_products_collection_url }}">Shop all</a>Examples document the rule contract. A safer direction is not an automatic apply instruction and still requires review in the complete theme context.
Limitations
- Only supported storefront route patterns are detected.
- The rule does not execute the storefront or prove every localization outcome.
- Custom routing implemented outside the analyzed theme may require manual review.
References
Compatibility
Supported
- Shopify Liquid themes
- Online Store 2.0 themes
- Locale-aware storefronts
Not established
- Headless storefront routing
- Routes injected by apps or client-side scripts
- Live locale configuration outside the theme snapshot