Follow

Template Error Reference

Syntax Error 

When you encounter a syntax error while validating WhatCount's templates, it is a sign that you have written invalid Jinja2 syntax in your template. Syntax errors in templates can happen for a variety of reasons, but are based on whether the template is able to be parsed. Please note that invalid HTML will not be validated in here. There are several main errors to look for:
  1. Have you closed all of your {{ and {% tags?
  2. If you're using filters ({{var|filter_name}}), does the filter you're trying to use exist?
  3. If you are using if statements or for loops, did you properly close the if statement or loop?

Generally, if you see an error message about an "unexpected character," it is a sign that you haven't closed a tag. Syntax highlighting will likely look strange around your error. Other syntax errors will usually have a more helpful error message. If you're unable to determine the cause of the syntax error, we'd recommend discarding your changes back to a known working state and making new changes incrementally to determine what is broken.

Missing can_spam tag 

WhatCounts requires the inclusion of the {{can_spam}} tag in every template so that we can verify that CAN-SPAM information has been included for compliance reasons. {{can_spam}} will be filled in with your store's mailing address or the CAN-SPAM information provided by your email service provider.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk