dboyd68
dboyd68

Reputation: 1104

Shopify liquid template debugging

I am trying to debug a Shopify theme.

I am a ruby dev, so understand the code.

But seems, if my liquid tags are in error than Shopify just ignores it/goes back to the previous version in production.

Any ideas how I can debug a live production theme's liquid template?

Upvotes: 1

Views: 6861

Answers (2)

thrgamon
thrgamon

Reputation: 448

Something that may help you or others coming to this question is using Shopify's themekit for offline development. This will catch syntax errors on upload, for example:

    10:25:19 [development] Received Update event on templates/product.liquid
    10:25:19 [development]Asset Perform Update to templates/product.liquid at host yourshop.myshopify.com
    Status: 422 Unprocessable Entity
    Errors: Liquid syntax error (line 7): Unknown tag 'not_a_tag'

There is a good, though slightly outdated now, tutorial here. To note, when he mentions downloading the shopify_theme gem, that is now not maintained and you should use themekit instead.

Upvotes: 0

dboyd68
dboyd68

Reputation: 1104

Worked it out, the view page source shows Liquid Errors: in it

Upvotes: 2

Related Questions