Incorrect Widget
Ensure your widget has a properly filled ID. Additionally, the CSS class name cannot be empty:
Incorrect:
{widget id=""}
{widget id="" class=""}
{widget id="firstname" class=""}Correct: {widget id="firstname"} or {widget id="firstname" class="signupFirstname"}
Special Characters
The error "Invalid Smarty syntax" may appear when editing templates. This typically occurs if you use special characters in your code. Often, this happens when you edit template text using a rich text editor (such as MS Word) and then copy and paste the content into the template editing block.
To avoid this issue, please refrain from editing templates in this manner. Use only the built-in editor.
Special Characters after Translation
Another possible reason is when you attempt to use certain words as a language source, but they are not translated in your language file and also contain special characters.
e.g.:
If you attempt to use ##Buenos días## and such a translation does not exist, simply remove the ## to resolve the issue. If you want it translated, use the appropriate translation from your language file.
Variables
Another reason for this error can be the incorrect placement of a Smarty variable — it should not be inside the translation source.
Incorrect: ##sign up at {$date}##
Correct: ##sign up at## {$date}
CSS Style
If you are using CSS styles in Smarty templates, enclose them with {literal} and {/literal} tags.
Example:
<style>
{literal}
body {
background: none repeat scroll 0 0 #FFFFFF;
font-family: Arial,Verdana;
}
#Content {
background-color: #F5F5F5;
color: transparent;
}
{/literal}
</style>However, in email templates, the {literal} tag is added automatically to the <style></style> tags. Therefore, you should insert style tags without the {literal} tags.