Skip to main content
Solved

Unable to send an email because of the following error: "The template you have selected contains invalid syntax"

  • October 17, 2021
  • 1 reply
  • 4828 views

Forum|alt.badge.img+2

Hi, I am traying to send a email to the list of clients however this message appears.

  The template you have selected contains invalid syntax. Please click here to edit it. Any idea how to fix it?

Best answer by David To

Hello @Debora Dilkin,

Thanks for sharing your question with the Klaviyo Community!

As that error message of “The template you have selected contains invalid syntax” suggests, this would indicate that there is a syntax error within your email template that must be resolved prior to sending. To resolve this and send your email off, I would suggest reviewing the elements of your template and locating and fixing the syntax error. 

From my experience a syntax error occurs due to minor spelling mistakes or a leading or trailing space that may be causing the issue. In addition, if you copied and pasted any codes or content from a third party source, this may also be the cause of the issue if the syntaxes being added do not align with Klaviyo syntax standards. To learn more about Klaviyo syntaxes and the Django standard Klaviyo follows, I would suggest taking a look at the following Help Center articles:

 

If you have further troubles, I would recommend reaching out to an email designer or a developer you are familiar with to see if they can help spot the syntax error causing the issue. Additionally, you can also finding a Klaviyo partner who can further assist you as well!

I hope this helps!

David

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • October 18, 2021

Hello @Debora Dilkin,

Thanks for sharing your question with the Klaviyo Community!

As that error message of “The template you have selected contains invalid syntax” suggests, this would indicate that there is a syntax error within your email template that must be resolved prior to sending. To resolve this and send your email off, I would suggest reviewing the elements of your template and locating and fixing the syntax error. 

From my experience a syntax error occurs due to minor spelling mistakes or a leading or trailing space that may be causing the issue. In addition, if you copied and pasted any codes or content from a third party source, this may also be the cause of the issue if the syntaxes being added do not align with Klaviyo syntax standards. To learn more about Klaviyo syntaxes and the Django standard Klaviyo follows, I would suggest taking a look at the following Help Center articles:

 

If you have further troubles, I would recommend reaching out to an email designer or a developer you are familiar with to see if they can help spot the syntax error causing the issue. Additionally, you can also finding a Klaviyo partner who can further assist you as well!

I hope this helps!

David