I upgraded my whole system: Craft Pro (2.9.2 to, Sprout Email Pro (2.4.7 to 4.4.8), and several others.

After fixing many errors, most occurred with Sprout Email, I now have only one major problem with Sprout Email: object variables will not resolve in text and redactor field in emails, although it has worked for several years before!

Object variables in the subject line will resolve and be shown in emails, all others are output as text: { myObjectVariable }

I changed the syntax to {{ object.myVariable }}, but it doesn't work with that either!

One interesting thing: When I click on preview in the notification email list, the {{ object.myVariable }} are replaced with the values from the last submitted form (= saved entry), the { myObjectVariable } are not.

What is going wrong?


This is expected behavior. This feature was changed due to a security vulnerability and is mentioned in the upgrade notes.

To create similar behavior you will need to confine your dynamic variables in the Control Panel to the Subject or Default Body fields. Any other custom variables will need to be added and managed in a custom email template.

We will consider adding back improved functionality in the CP workflow if we can find a way to do it safely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.