Closed sjclark closed 5 months ago
Describe the bug The code following results in a reference being replaced with an int_ reference
int_
{{ unless ({cookie:visited}) | contains(url) }} {{ new_cookie = (({cookie:visited}) + ',' + ({url})) }} {{ cookie:set :visited="new_cookie" }} {{ /unless }}
results in the first line being changed to {{ unless (int_4d5317e034b8) | contains(url) }} Interestingly it seems to work fine if logic is changed to:
{{ unless (int_4d5317e034b8) | contains(url) }}
{{ if ({cookie:visited}) | contains(url) }} {{ else }} {{ new_cookie = (({cookie:visited}) + ',' + ({url})) }} {{ cookie:set :visited="new_cookie" }} {{ /if }}
Still occurs if {cookie:visited} (instead of surrounded by brackets) is used.
{cookie:visited}
Deleting the rest of the template does nothing - ie. the code above in isolation is enough to trigger this.
Impacted Products Which Antlers Toolbox products does this bug apply to?
Please let me know if I can provide more info? Totally possible my syntax is off - haven't played with the cookie function before today. 🙏
Thanks for the report! I've released a patch to correct this in the following versions:
Describe the bug The code following results in a reference being replaced with an
int_
referenceresults in the first line being changed to
{{ unless (int_4d5317e034b8) | contains(url) }}
Interestingly it seems to work fine if logic is changed to:Still occurs if
{cookie:visited}
(instead of surrounded by brackets) is used.Deleting the rest of the template does nothing - ie. the code above in isolation is enough to trigger this.
Impacted Products Which Antlers Toolbox products does this bug apply to?
Please let me know if I can provide more info? Totally possible my syntax is off - haven't played with the cookie function before today. 🙏