Body: <p>After upgrading to civi 4.4.19 Civi doesn't recognize built in tokens. The upgrade was smooth with no errors reported. </p>
  
  <p><strong>Symptoms are as follows:</strong></p>
  
  <p>(1) If {domain.address} and {action.optOutUrl} are in the body of the email, civi reports that they are required when I try to move to the preview page.  If instead they are in the footer I can move on to the next step and these appear to substitute correctly.</p>
  
  <p>(2) Simple tokens, for example {contact.first_name} are not evaluated in the preview, and if you move from the compose page to the preview page and back, the token is stripped from the text.</p>
  
  <p>(3) Drupal error log says "User error: in Smarty->trigger_error() (line 1094 of [mysite]/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php)."</p>
  
  <p>Googling that suggests that it's a problem with smarty not being able to find application tokens.</p>
  
  <p><strong>Things I've tried:</strong> 
  I have confirmed that  /sites/all/modules/civicrm/packages/Smarty/plugins is there</p>
  
  <p>I have cleared caches with (1) drupal clear all caches and (2) /index.php?q=civicrm/menu/rebuild&amp;reset=1 and (3) rm -rf en_US in templates directory an (4) [mysite]/civicrm/admin/setting/updateConfigBackend?reset=1</p>
  
  <p>What else can I do to try to debug this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-10T17:56:37.190Z
Comments.Text: Minor progress. In upload.php the code is expecting a string for the html message, but is getting an array: ([value] => {domain.address}{action.optOutUrl}  [format] => 2)  (my message is two tokens only for simplicity)
  
  If I hack code to pull value from array:  $str  = $params[$file . '_message']['value'];  symptom #1 resolves so I no longer get the required tokens message.
  
  Very strange.  Any ideas?
  
  In any case, that doesn't solve #2 - no token substitution/stripping of tokens before preview.   Any suggestions would be appreciated.
Comments.UserDisplayName: ASav
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-18T18:59:10.417Z
Comments.Text: This turned out to be related to using the "drupal default editor" for wysiwig.  I was never able to resolve it, but changing that to ckeditor and manually configuring it to be as similar as possible to my drupal one resolved all issues.
Comments.UserDisplayName: ASav
Tags: <civimail><tokens>
Title: CiviMail not recognizing Tokens
ThreadText: # CiviMail not recognizing Tokens
  
  (Asked by: username_0 on 2015-11-03)
  
  After upgrading to civi 4.4.19 Civi doesn't recognize built in tokens. The upgrade was smooth with no errors reported.
  
  **Symptoms are as follows:**
  
  (1) If {domain.address} and {action.optOutUrl} are in the body of the email, civi reports that they are required when I try to move to the preview page. If instead they are in the footer I can move on to the next step and these appear to substitute correctly.
  
  (2) Simple tokens, for example {contact.first\_name} are not evaluated in the preview, and if you move from the compose page to the preview page and back, the token is stripped from the text.
  
  (3) Drupal error log says "User error: in Smarty->trigger\_error() (line 1094 of [mysite]/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php)."
  
  Googling that suggests that it's a problem with smarty not being able to find application tokens.
  
  **Things I've tried:**
  I have confirmed that /sites/all/modules/civicrm/packages/Smarty/plugins is there
  
  I have cleared caches with (1) drupal clear all caches and (2) /index.php?q=civicrm/menu/rebuild&reset=1 and (3) rm -rf en\_US in templates directory an (4) [mysite]/civicrm/admin/setting/updateConfigBackend?reset=1
  
  What else can I do to try to debug this?
  
  **Tags:** civimail, tokens
  
  > **Comments:**
  > **username_0**: Minor progress. In upload.php the code is expecting a string for the html message, but is getting an array: ([value] => {domain.address}{action.optOutUrl}  [format] => 2)  (my message is two tokens only for simplicity)  If I hack code to pull value from array:  $str  = $params[$file . '_message']['value'];  symptom #1 resolves so I no longer get the required tokens message.  Very strange.  Any ideas?  In any case, that doesn't solve #2 - no token substitution/stripping of tokens before preview.   Any suggestions would be appreciated.  
  > **username_0**: This turned out to be related to using the "drupal default editor" for wysiwig.  I was never able to resolve it, but changing that to ckeditor and manually configuring it to be as similar as possible to my drupal one resolved all issues.  
  
  ---
  
  ## 0 answers
  
  