cancel
Showing results for 
Search instead for 
Did you mean: 

Email template 'contacts_email_email_template' is not defined

SOLVED

Email template 'contacts_email_email_template' is not defined

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Email template 'contacts_email_email_template' is not defined

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.

View solution in original post

3 REPLIES 3

Re: Email template 'contacts_email_email_template' is not defined

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'.

Re: Email template 'contacts_email_email_template' is not defined

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.

Re: Email template 'contacts_email_email_template' is not defined

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

Trusted Magento 2 Extensions