Faced with the issue that the user is not sent a letter when requesting to change the password. The email template exists and it is assigned to the business event.
About template - earlier emails from this template of the site were sent. But then the site database was re-uploaded and after that the letters were no longer sent.
Depending on information from var/log - have this error message:
app.ERROR: Could not render Mail-Template with error message: Failed rendering string template using Twig: Variable „customer“ does not exist in „9a19555604feb07a124be2ff355ec368“ at line 1. Error Code:0 .
Do I understand this error correctly - the „customer“ value has disappeared from the database? If so, are there any ways to restore this information in the database?
It should work, if you replace the „customer“ variables with the following.
Firstname: {{ userRecovery.user.firstName }}
Lastname: {{ userRecovery.user.lastName }}
I checked this option, but it didn’t work either. The letter for some unknown reason does not parse the values. {{customer.title}} {{customer.firstName}} {{ customer.lastName }}, {{ userRecovery.user.firstName }}, {{ userRecovery.user.lastName }}, {{ urlResetPassword }} not working. if I delete all these values, then the letter will come to the mail.
did you remove the {{customer.title}} {{customer.firstName}} {{ customer.lastName }} from the template when using the other variables?
Alternatively, you can also trigger the business event via the storefront and check the logs again. There should be a similar error message as the one before.
Then you can remove the variables one by one, depending on what the error message says.
In my testing environment {{ userRecovery.user.firstName }}, {{ userRecovery.user.lastName }}, {{ urlResetPassword }} all worked fine (SW 6.4.3.1).
Otherwise, what version of Shopware are you using?
Hi @PatrickHoelscher !
Yes, I checked it right after your recommendation. A letter without variables (just text) comes, but if i add variables (no matter which one - {{customer.title}} or {{ userRecovery.user.firstName }} ), the letter stops coming. I found the same problem with subscribing to the newsletter.
@PatrickHoelscher good day and I apologize for missing.
The problem was solved by replacing non-working variables with working ones. As far as I know, they differ from those that you suggested, but the essence remains the same.
Thank you for your help and all the best to you!