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?

  • 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. – Anne Savage Nov 10 '15 at 17:56
  • 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. – Anne Savage Nov 18 '15 at 18:59

Your Answer

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

Browse other questions tagged or ask your own question.