Hi there,
I've cloned the Luma theme and created by own from it. I've just tested the Contact form and I get an error on the page saying
"An error occurred while processing your form. Please try again later."
I am getting this error in the exception.log:
main.CRITICAL: Email template 'contacts_email_email_template' is not defined. {"exception":"[object] (UnexpectedValueException(code: 0): Email template 'contacts_email_email_template' is not defined. at /var/www/magento/html/magento2/app/code/Magento/Email/Model/Template/Config.php:225)"} []
I also notice that in Marketing > Email templates > Add new template unlike the other transactional emails, when I load the Contact Form one it doesn't say "Used in..."
I am on CE 2.2.5.
Thanks
Any ideas please?
Solved! Go to Solution.
Just had this problem again and realised I never posted my fix here!
I didn't actually want a custom email template, just the standard one shipped with Magento. I've no idea what is overriding the template name - I grep'd the codebase and no sign of any files containing "contacts_email_email_template", so I just went to
Store -> Configuration -> General -> Contacts -> Email Options -> Email Template
and checked the "Use system default" next to Email Options >Email Template (which disabled "Contact Form (default)" in the dropdown). Re-submitting the contact form it works and gives no exception.
Are you using custom contact email template? If yes then seems the email template "contacts_email_email_template" is not defined.
As by default in Magento contacts us email template is "contact_email_email_template" not "contacts_email_email_template"
You can have a look on this file
"vendor\magento\module-contact\etc\email_templates.xml"
So if you want to use a custom email template then:
1. you have to create a new template from
Marketing -> Email Templates by loading contact us default email template and modify as per your requirement.
2. Setup up newly created template for contacts up from
Store -> Configuration -> General -> Contacts -> Email Options -> Email Template
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Just had this problem again and realised I never posted my fix here!
I didn't actually want a custom email template, just the standard one shipped with Magento. I've no idea what is overriding the template name - I grep'd the codebase and no sign of any files containing "contacts_email_email_template", so I just went to
Store -> Configuration -> General -> Contacts -> Email Options -> Email Template
and checked the "Use system default" next to Email Options >Email Template (which disabled "Contact Form (default)" in the dropdown). Re-submitting the contact form it works and gives no exception.
Find it hard to work with Magento email? Magento 2 Email Builder from Magezon may be a solution for you https://ext-5487952.livejournal.com/431.html