LiquidLimits & Errors

Limits & Errors

Every Liquid section renders on every page view of every store that uses it, so the engine enforces limits. A normal section is nowhere near them. This page lists the limits and the errors you can meet, with what to do about each.

Limits

LimitValue
Template source96 KB, checked when you save
Parsed characters256 K per parse
Rendered output512 KB, stopped mid-render
Render budget400 ms of CPU, reported with line and column
Render timeout500 ms wall-clock
Allocation budget2M units. Stops {% for i in (1..100000) %} at the range

For scale: the built-in slider is about 7 KB and renders in a few milliseconds; the largest preset, the site footer, is about 63 KB and renders in around 10 ms. The playground shows the render time and output size of your section above the preview.

Find the errors

This section has three mistakes. The playground shows the error the editor would show when saving. Fix them one by one.

Broken on purpose
Playground
Loading editor…

This template would not save

  • Template uses unsupported tag(s): {% include %}.
  • Liquid syntax error: undefined filter: uppercase, line:4, col:5

Runs in your browser on sample data: the same engine and filters as the storefront. Widgets such as add to cart are simulated: clicking one shows what would happen on a store.

Errors when saving

Error saysMeansFix
Liquid syntax error: tag {% if … %} not closed, line:…An if, for, case, capture or comment has no end tag.Add {% endif %}, {% endfor %} and so on. Count them: the editor underlines the line.
Liquid syntax error: undefined filter: …A filter name does not exist. Filters are checked strictly.Check the spelling against Filters. Shopify-only filters not in the list are not available.
Template uses unsupported tag(s): {% include %}.A denied tag.Use {% render 'name' %} with a theme snippet.
Template renders snippet(s) the theme does not have: '…'.A {% render %} names a snippet that does not exist.Create the snippet, or fix the name.
settings[3] has unsupported type "…". Supported: …A schema setting has a type Joomni does not know.Use one of the types on Schema & settings.
Schema is not valid JSON: …The {% schema %} block is not valid JSON.Look for a trailing comma or a missing quote. JSON allows no comments.
Template is 100KB, over the 96KB limit.The source is over the size limit.Move repeated markup into a snippet, or split the section.

Errors when rendering

Error saysMeansFix
template render limit exceeded, line:…, col:…The render used more than its CPU budget.Look for a loop inside a loop over large lists, or a big range. Use limit: on loops.
memory alloc limit exceeded, line:…A range, join or string built too much.{% for i in (1..100000) %} is the usual cause. Loop over real data instead.
Rendered output passed the 512KB limit and was stopped mid-render.The section produced too much HTML.A runaway loop. Check nested loops and repeated includes of large snippets.

A broken section never breaks the page

On a live store, a section that fails to render is left out and the rest of the page renders normally. In the editor it shows the error in place of the section, so the merchant sees it before shoppers do.

Things that fail silently

Some mistakes produce no error at all, just missing output. These are the ones to check when a section renders less than you expect:

  • A misspelled object or field ({{ prodcut.title }}) prints nothing. Unknown variables are not errors, so sections degrade on pages without their data.
  • A filter inside brackets (s['a' | append: i]) reads the wrong key. See Authoring standards.
  • A hyphenated handle with dot access (linklists.main-menu). Use linklists["main-menu"].
  • A filter used in an if condition. Assign the result first, then compare.
  • Empty strings and 0 are true. Compare with blank or size.

Still stuck? Our team reads every message.

Need help?