3

Running CiviCRM 5.22.0 with WordPress 5.3.2

Whenever a user attempts to create a membership AND record membership payment AND send confirmation and receipt, an Invalid currency "$" error is generated. The membership and contribution are recorded in the database, but no e-mail is generated. CiviMail is working in all other contexts.

If a user creates a membership AND records membership payment but does NOT check "Send Confirmation and Receipt?," the transaction completes without error. Editing the membership and selecting "Send Confirmation and Receipt?" will generate the invalid currency error.

I enabled debugging and backtrace and the error displayed with the exception trace is:

CRM_Core_Exception: Invalid currency "$" in <docroot>/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty/plugins/modifier.crmMoney.php on line 35 

Any thoughts?

  • Do you have any custom extension enabled on your site? Also, it would help if you paste the complete backtrace to the post. – jitendra - fuzion Feb 10 at 12:11
  • just a point that when you say "no e-mail is generated. CiviMail is working in all other contexts", it is not civimail which is handling the sending of receipts – petednz - fuzion Feb 13 at 20:06
  • I have two extensions enabled: com.iatspayments.civicrm and eu.tttp.group2summary. – zinn Feb 16 at 4:46
4

We had the same issue. The cause of the membership creation issue is with the email template syntax. Look in your system-generated messages and change the receipt templates you are using with, any instance of:

{$line.unit_price|crmMoney:$currency}
{$line.line_total|crmMoney:$currency}
{$formValues.total_amount|crmMoney:$currency}

Needs to be changed to:

{$line.unit_price|crmMoney}
{$line.line_total|crmMoney}
{$formValues.total_amount|crmMoney}
| improve this answer | |
  • Yes! That fixed it. Thank you so much! – zinn Feb 16 at 4:49

Your Answer

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

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