Skip to content

fix(theme): make templates pass strict Liquid validation - #25

Draft
EvilGenius13 wants to merge 1 commit into
mainfrom
fix/strict-liquid-templates
Draft

EvilGenius13 wants to merge 1 commit into
mainfrom
fix/strict-liquid-templates

Conversation

@EvilGenius13

@EvilGenius13 EvilGenius13 commented Sep 30, 2026 •

Copy link
Copy Markdown

What and why

Shopify rejects this theme on strict-Liquid stores with three errors. layout/theme.liquid compares inside assign should_redirect = template != blank, templates/gift_card.liquid nests {{ }} inside quoted strings for the title and remaining balance, and templates/list_collections.json fails with "Template type 'list_collections' does not support JSON templates". The Vibe and WordPress redirect themes are built from this repo's vibe-redirect-theme and wordpress-sales-channel branches and install on about 1,000 new shops a day, so as strict parsing rolls out, those installs depend on the platform rewriting these files.

should_redirect is now set inside an if template != blank block, which keeps the original intent. The two broken gift card strings and the Apple Wallet alt text are now plain English, like the rest of the template, which the original author converted from Dawn's translation keys to English in 2022. There is no locale file because adding any *.default.json makes core treat the theme as supporting only English, and a main theme then resets a non-English shop's primary locale to en. The JSON template is renamed to list-collections.json, the name Shopify uses. One extra line: the "Continue shopping" link now checks storefront_hostname != blank, because an empty setting counted as true and rendered href="https://".

After this merges, the same commit goes onto vibe-redirect-theme and wordpress-sales-channel, where it cherry-picks cleanly, and both zips get republished through Shopify/static-cdn-assets.

🎩 Tophat it

You need a dev store with strict Liquid enabled. The redirect itself was checked with local renders, not on a live storefront.

  1. Push the theme to the strict store. It uploads with no errors. The same command on main fails with the three errors above.
shopify theme push --unpublished
  1. Preview the gift card at /gift_cards/[store_id]/preview while the dev server runs. The page title reads "Here's your $100 gift card for" followed by the shop name.
shopify theme dev

@EvilGenius13
EvilGenius13 force-pushed the fix/strict-liquid-templates branch from 5b0860e to 2df097b Compare September 30, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant