I have a few Mail Templates that have conditional smarty codes like:

{capture assign=pp_scan}{contact.custom_74}{/capture}{if $pp_scan}You have already provided{else}You have not yet provided{/if} a scan of your passport.

This code ran just fine until I upgraded to 4.7.27 (from 4.7.21). Don't know if it is related to the upgrade or just a coincidence. Now, this code resolves to

{capture assign=pp_scan}{/capture}{if $pp_scan}You have already provided{else}You have not yet provided{/if} a scan of your passport.

in the text of the email.

How do I debug the smarty code in mail templates? I tried adding {debug} to the mail template, but that didn't help.

1 Answer 1


Any chance in your settings file the "CIVICRM_MAIL_SMARTY" just needs to be turned back 'on'?

  • Yes, that is exactly it. Thanks. Some follow-up, though. If this is a standard setting to have to reset after an upgrade, it would sure be nice to get a notice to this effect. Also, in Joomla, there is a civicrm.settings.php file under components/com_civicrm/ and under administrator/components/com_civicrm/ Changing the admin file fixed my problem. Presumably, the non-admin file affects situations where the smarty engine runs on the front-end, but I'm not sure what instances those would be. No real questions, here, just observations... Nov 28, 2017 at 15:55
  • It's been a little bit since I've run an upgrade, but I think the Wiki makes mention of backing up your settings file as a part of the upgrade process.
    – RayWright
    Nov 28, 2017 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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