You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to get custom tokens variables to work in the subject/body.
My main use case:
I want to specify the subject from the API. How I send the custom tokens work in the vanilla templating system, but Twig doesn't get them.
Template:
Subject: {% TWIG_BLOCK %}{% subject %}{% END_TWIG_BLOCK %}
Body:
{content}
{signature}
{unsubscribe_text}
Request: POST https://mautic.varigergo.hu/api/emails/EMAIL_ID/contact/CONTACT_ID/send
[2023-04-09 13:37:09] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\SyntaxError: "Unknown "subject" tag in "__string_template__63495053935a5082041ab9769b6c41ccf06b0329b0eeb8cb21a49cc072432a2c" at line 1." at /var/www/html/vendor/twig/twig/src/Parser.php line 160 {"exception":"[object] (Twig\\Error\\SyntaxError(code: 0): Unknown \"subject\" tag in \"__string_template__63495053935a5082041ab9769b6c41ccf06b0329b0eeb8cb21a49cc072432a2c\" at line 1. at /var/www/html/vendor/twig/twig/src/Parser.php:160)"} {"hostname":"ae6df2b3b54a","pid":50}
The text was updated successfully, but these errors were encountered:
[2023-04-09 13:58:05] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\SyntaxError: "Unknown "lead" tag in "__string_template__18b092cad8de03ef76402f7817cbd7520c925b89360e4bbd29fd19bc09400f63" at line 1." at /var/www/html/vendor/twig/twig/src/Parser.php line 160 {"exception":"[object] (Twig\\Error\\SyntaxError(code: 0): Unknown \"lead\" tag in \"__string_template__18b092cad8de03ef76402f7817cbd7520c925b89360e4bbd29fd19bc09400f63\" at line 1. at /var/www/html/vendor/twig/twig/src/Parser.php:160)"} {"hostname":"ae6df2b3b54a","pid":49}
So actually, no variable is available...
gregistech
changed the title
Can't use custom tokens
Can't use any variables
Apr 9, 2023
I can't seem to get
custom tokensvariables to work in the subject/body.My main use case:
I want to specify the subject from the API. How I send the custom tokens work in the vanilla templating system, but Twig doesn't get them.
Template:
Subject:
{% TWIG_BLOCK %}{% subject %}{% END_TWIG_BLOCK %}
Body:
Request:
POST https://mautic.varigergo.hu/api/emails/EMAIL_ID/contact/CONTACT_ID/send
Error:
The text was updated successfully, but these errors were encountered: