Shop Buddy

Shopify Liquid errors · Unknown tag

Fix “Liquid syntax error: Unknown tag” on your Shopify store

The tag at that line is not one Shopify Liquid knows. Usually a typo in a closing tag (endfi, endfor without a for), a tag from another Liquid flavour such as Jekyll, or code pasted from a tutorial for a different platform.

Liquid syntax error (sections/main-product line 84): Unknown tag 'endfi'

Paste your version of the error

The file, line, and name in your error are turned into exact steps.

Decoded in your browser. Nothing is sent anywhere.

How to fix it in Shopify

  1. In Shopify admin open Online Store, then Themes. On the theme that shows the error choose the three-dot menu, then Edit code. If that is your live theme, duplicate it first and fix the copy.
  2. Open the file and line from the error. Fix the spelling if it is a typo, or remove the tag if it is not a Shopify Liquid tag.
  3. Make sure every opening tag has the matching closing tag: if with endif, for with endfor, unless with endunless, case with endcase.
  4. Save. The editor refuses to save while a syntax error remains, so the file is fixed when it saves.

Fix it without touching your live theme

Add Shop Buddy to Claude or ChatGPT and paste the error there. It finds the line in your actual theme, makes the fix on a private copy, shows you before-and-after screenshots, and publishes only when you tap. Roll back with one tap.

Get started

Questions

Where do I find the list of valid tags?
Shopify's Liquid reference lists every tag and filter. Anything not on it will raise this error.

Other Shopify Liquid errors