Smarty variable tokens not correctly processed in message subject
Overview
Smarty variable tokens are not processed in message subject
Reproduction steps
- In a message template body html we have for instance {capture assign="firstname"}{contact.first_name}{/capture}
- We use {$firstname} in the body.
- We use {$firstname} in the subject.
- When sending a email manually the subject token gets replaced.
- When sending via scheduled reminders or civirules the subject token does not get replaced.
- Worse: our automatic birthday mail batch (civirules) got firstnames of the previous contact (only in the subject)
Current behaviour
smart variables are sometimes not correctly replaced as a token in the message subject
Expected behaviour
smart variables are sometimes always correctly replaced as a token in the message subject
Environment information
- CiviCRM: 5.61.2
- CMS: Drupal 7.97
- PHP: 7.4.33 (fpm-fcgi)
- Database: 10.5.19-MariaDB-0+deb11u2-log engine: InnoDB 10 row format: Dynamic
- Webserver: Apache/2.4.56 (Debian)
- OS: Linux
Comments
I will doublecheck if this is only the case with civirules or also with the scheduled reminders