Error creating thank you letter with multiple contributions.
Overview: I'm creating a custom thank you following the instructions here
https://docs.civicrm.org/user/en/latest/contributions/manual-receipts-and-thank-yous/
However the {contribution.total_amount} token is causing an error saying
Invalid currency "USD****~~~~USD****~~~~USD****~~~~USD****~~~~USD"
This is happening when setting grouping to contact and there are multiple contributions.
I tested this on D7 and WP sites with civi 5.31 or before and it worked fine but when using civi 5.32 and later (including the Dmaster and WPmaster demo's I am getting this error.
So it seems to be something relatively new causing this.
Same issue can be found on SE at https://civicrm.stackexchange.com/questions/38540/invalid-currency-error-when-using-custom-template
Reproduction steps
- Select multiple contributions from same contact in find contribution.
- selected send thank you letters.
- Put the token {contribution.total_amount} into the thank you letter and set grouping to contact (so that it groups multiple transactions into one letter)
- Error shown above is shown and no letter is created.
Current behavior
I get an error saying Invalid currency "USD****~~~~USD****~~~~USD****~~~~USD****~~~~USD"
when trying to create a thank you letter with multiple transactions from the same contact.
Expected behaviour
Letter should be created.
Environment information -->
- __CiviCRM: Error seems to have started from version 5.32 and onward. Tested on versions prior to and up to 5.31 and it went fine.
- __CMS:Drupal Tested on WP and D7