1

Does anyone know how I may resolve this issue? I'm running CiviCRM 5.40.0 on WordPress 5.8.1. When I tried to create a new / update contact record, it will throw a PHP Fatal error with the following log:

[Tue Oct 05 21:39:31.389811 2021] [proxy_fcgi:error] [pid 2091:tid 140391877703424] [client 172.68.133.85:0] AH01071: Got error 'PHP message: PHP Fatal error:  Smarty error: [in evaluated template line 1]: syntax error: unrecognized tag: , (Smarty_Compiler.class.php, line 441) in /webhost-file-path/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1100', referer: website-address/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fview&reset=1&cid=43


[Tue Oct 05 21:44:40.311374 2021] [proxy_fcgi:error] [pid 2090:tid 140392439719680] [client 162.158.255.225:0] AH01071: Got error 'PHP message: PHP Fatal error:  Smarty error: [in evaluated template line 1]: syntax error: unrecognized tag: , (Smarty_Compiler.class.php, line 441) in /webhost-file-path/wp.sfcp.org/wp-content/plugins/civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1100', referer: website/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontact%2Fadd&reset=1&ct=Individual

Does anyone know what the above log means? I'm looking at the smarty.php file, and line 441 is:

/**
 * where assigned template vars are kept
 *
 * @var array
 */
var $_tpl_vars             = array();

except that I have no idea what the assigned template variable is. It will be greatly appreciated if anyone would point me in the right direction on how to resolve the issue. Thanks!

1
  • This is a quick update: I just upgraded the CiviCRM to 5.41.2, removed the custom template directory, uninstalled Contact Layout Summary but still run into the same issue when I tried to save a new contact record.
    – Aaron
    Oct 5, 2021 at 22:18

1 Answer 1

4

Nevermind. I've looked through all of the settings, and it turns out that my colleagues modified the Addresses format but didn't do it correctly. Once this is fixed, everything is back to normal now. Thanks.

2
  • Thanks for this - I was getting an almost identical error, and it was in the greetings formats, which I found right away thanks to this. Dec 29, 2021 at 19:02
  • Just for the record: we found these errors appearing when people copied formatted text from Word or Synology into the text editor of message templates. These tools add much strange markup to the text which is not cleaned up by the editor. Whenever these message templates are edited or used for a mailing masses of these errors appear. Apr 29, 2022 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.