14

I am getting below error in magento 2 local system.

We're sorry, an error has occurred while generating this email.

9
  1. Enable developer mode using command line php bin/magento deploy:mode:set developer
  2. Clear cache using command line php bin/magento cache:flush
  3. Reload the front end page
  4. After reloading the page the message will change to

Error filtering template: Unable to write file into directory \C:/xampp/htdocs/Magento/pub/media/catalog/product\cache\f073062f50e48eb0f0998593e568d857/m/b. Access forbidden.

  1. Follow this link to fix https://magento.stackexchange.com/questions/170376/magento-2-unable-to-write-file-into-directory-access-forbidden
  2. Clear cache
  3. Reload the front end page again
  4. If you see another message after enabling developer mode you can google it.
5

The first thing you need to do is go to your .htaccess file. Uncomment

SetEnv MAGE_MODE developer

The error message is 90% of the time misleading and most likely you have an xml parsing issue. Either way turning on the developer environment and clearing the cache will pull the error.

Without seeing your error log it'd be hard to give an exact diagnosis. Some users will say sendmail will fix this error but generally this is because the error is trying to be emailed to you and that is because you are not in the correct developing environment to debug the issue. This could be because you are in default or production mode which is not ideal for fixing issue.

The sendmail module is meant to allow a site to operate and if any issues do occur with the site then the developer can be notified and hopefully the error hasn't caused a full site rendering issue. This way a site can still operate unbeknown to users and the issue can be resolved by a qualified developer behind the scenes.

  • after set developer mode, then it's showing another error. "failed to load resources ......" – Sarower Jahan May 8 '17 at 21:05

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.