Help Resolving a Liquid Syntax Error: "Tag was not properly terminated with regexp: /\%\}/"
Hello!
I'm having trouble with a macro. I've been unable to save it due to a Liquid syntax error.
I want to check a ticket field to see if the requester someone entered their name. If they didn’t, I want the salutation to just say “Hello.” If they did, I want it to say “Hi {{first_name}}.”
My code looks like this:
{% if ticket.ticket_field_XXXXXXXXXXX == blank %}
Hello,
{% else %}
Hi {{ticket.ticket_field_XXXXXXXXXX}},
{% endif %}
And the error I throw is this:
A template placeholder is in an invalid format: Liquid syntax error: Tag '{% if ticket.ticket_field_XXXXXXXXXX == blank %}' was not properly terminated with regexp: /\%\}/
I can’t seem to figure out how the tag should be “properly terminated.” From everything I can find, "%}"
ought to be valid here.
I'd greatly appreciate any help. Thanks!
-
I copied your syntax and had no problem. Is that exactly as you have it in the macro? Did you do any copying and pasting that might have contained a strange version of a character/do you use a standard keyboard?
This is what I did:
{% if ticket.ticket_field_123456789 == blank %}blank stuff{% else %}not blank stuff{% endif %}
Please sign in to leave a comment.
1 Comments