On the development environment the error names the template and the line. The usual causes: an unclosed {if} or {foreach}; a { in inline CSS or JavaScript with no space after it, which Smarty reads as a tag (wrap the block in {literal}); a {* comment *} inside an array literal; a nested comment; and a security-policy refusal, whose message names the modifier or function, and which looks like a syntax error until you read it.
Answer
Errors and blank pages
A Smarty syntax error I cannot locate
More in Errors and blank pages
- "Call to a member function on null" in a template
- A Smarty template seems to skip a PHP function I called
- A Twig template errors on an undefined variable that used to render empty
- Output is double-escaped, or not escaped at all, after a template was ported
- "Method X does not exist" when rendering a record
Was this page helpful?
Your answer goes to the docs team.