Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,374
    • Issues 1,374
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM Core
  • Issues
  • #58
Closed
Open
Created Apr 10, 2018 by gremblebean@gremblebean

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:&lt;p&gt;&lt;!-- Created By Divink Ltd --&gt;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0 &quot; /&gt;&lt;meta name=&quot;format-detection&quot; content=&quot;telephone=no&quot; /&gt;&lt;!--[if !mso]&gt;&lt;!--&gt;&lt;!--&lt;![endif]--&gt;
&lt;style type=&quot;text/css&quot;&gt;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

Edited Apr 10, 2018 by gremblebean
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking