Running the send_reminder job produces a smarty error using a HTML body
Running the send_reminder job produces a smarty error using a HTML body. It appears Smarty is taking the raw HTML (e.g.
in the message from the body_html column and escaping it (e.g. <p>), at least in the error output. I'm not sure why the tags don't just pass through. It appears the text editor has added a
tag at the start of the document. I'm not sure how to handle this in terms of how people might edit documents and have them successfully schedule. As it is the send_reminder process simply fails, and the only way to spot this is to check in the "scheduled jobs". Essentially any user could break send_reminder simply by adding a bit of HTML Smarty does like:
/usr/bin/php /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/bin/cli.php -s my.3ca.org.uk -u admin -p ***** -e Job -a send_reminder
PHP Warning: array_diff(): Argument #1 is not an array in /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/Token.php on line 1454
PHP Warning: array_diff(): Argument #1 is not an array in /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/Token.php on line 1457
PHP Fatal error: Smarty error: [in string:<p><!-- Created By Divink Ltd --><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1.0 " /><meta name="format-detection" content="telephone=no" /><!--[if !mso]><!--><!--<![endif]-->
<style type="text/css">body {
margin: 0 !important;
padding: 0 !important;
-webkit-text-size-adjust: 100% !important;
-ms-text-size-adjust: 100% !important;
-webkit-font-smoothing: antialiased !important;
}
img {
border: 0 !important;
outline: none !important;
}
p {
Margin: 0px !important;
Padding: 0px !important;
}
.ExternalClass * {
line-height: 100%;
}
.em_defaultlink a {
color: inherit !important;
text-decoration: none !important;
}
span.MsoHyperlink {
mso-style-priority: 99;
color: inherit;
}
span.Mso in /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1100
Seems the release of Smarty in CiviCRM is not the latest, being 2.6.30, with the latest release being 2.6.31: https://github.com/smarty-php/smarty/releases/tag/v2.6.31