Answers.Body: <p>Any chance in your settings file the "CIVICRM_MAIL_SMARTY" just needs to be turned back 'on'?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-28T15:55:22.723Z
Answers.Text: 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...
Answers.UserDisplayName: Phil Morice Brubaker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-28T16:46:25.993Z
Answers.Text: 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.
Answers.UserDisplayName: RayWright
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-28T03:14:11.143Z
Answers.LastActivityDate: 2017-11-28T03:14:11.143Z
Answers.UserDisplayName: RayWright
Body: <p>I have a few Mail Templates that have conditional smarty codes like:</p>
  
  <pre><code>{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.
  </code></pre>
  
  <p>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</p>
  
  <blockquote>
    <p>{capture assign=pp_scan}{/capture}{if $pp_scan}You have already provided{else}You have not yet provided{/if} a scan of your passport.</p>
  </blockquote>
  
  <p>in the text of the email.</p>
  
  <p>How do I debug the smarty code in mail templates? I tried adding {debug} to the mail template, but that didn't help.</p>
  
Tags: <message-templates><smarty>
Title: How to debug Smarty mail template codes, broken after upgrade
ThreadText: # How to debug Smarty mail template codes, broken after upgrade
  
  (Asked by: username_0 on 2017-11-27)
  
  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.
  
  **Tags:** message-templates, smarty
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-28. Score: 1 | Accepted answer
  
  Any chance in your settings file the "CIVICRM\_MAIL\_SMARTY" just needs to be turned back 'on'?
  
  > **Comments:**
  > **username_0**: 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...  
  > **username_1**: 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.  
  
  ---
  
  