Are you getting Exception Printing is Disabled by Default for Security Reasons error in Magento 2?
Don’t worry. It is as easy to solve as the ‘error processing your request in Magento’ error.
In this quick tutorial, we will learn how to solve Exception Printing is Disabled by Default for Security Reasons error.
What Exception Printing is Disabled by Default for Security Reasons in Magento 2?
The message is displayed when some error stops the request processing. The system cannot tell you the exact error to avoid any security exploit, so it tells the effect of the bug.
You can trace the bug and issue from the problem it is causing.
The exception printing is disabled by default is a general error. It happens at the time of Magento 2 or extension update.
Typically, administrators find this issue while installing a Magento 2 theme or module. The cache folder is also partially responsible.
The themes and extensions are not always compatible. Their components do not fit smoothly and create a conflict. It causes the ‘exception printing is disabled by default’ error.
The issue is minor; however, Magento 2 stopped working, halting the development.
However, here is a quick solution.
Solution for Exception Printing is Disabled by Default for Security Reasons in Magento 2
If you are not managing the Magento hosting and backend, you should always consult with the developers and the team managing your server. They may be working on some updates and patching that cause this error. They will troubleshoot this issue once their work is done.
Then not every server management service is quickly responsive to such requests. At Breeze, things are different. Our support team understands your store is your priority – and that’s why we have a 1-minute reply frame for every ticket raised.
There are two methods for this error message
#1 Clear your Cache
Clearing the Magento cache often solves the Magento errors.
Clear Cache from Magento admin panel:
- Log in to the Magento store
- Go to System
- Access Cache Management
- Press the orange Flush Magento Cache button
- Scroll down to find more Cache Management
Flush Magento 2 cache via Command Line:
Flush Cache Storage:
php bin/magento cache:clean
A short command line:
php bin/magento c:c
Flush Magento cache:
php bin/magento cache:flush
Flush Magento 2 cache from Breeze:
If you are using Breeze to manage your Magento store, you can flush the cache from the dashboard.
Follow the steps to clear all website cache:
- Login to your Breeze platform
- Select the Company you like to work on
- Click on the ‘Sites’ to open the site list
- Open the ‘Website’ to clear the cache
- Open the Overview section
- Find the Purge All Cache under Quick Tools
#2 Enable exception printing errors
The exception printing is disabled by default – so a method to solve this error is to enable the exception printing error. This will expose the exact problems so you can solve them.
Switch your store to developer mode by running the following command:
php bin/Magento deploy:mode:set developer
Navigate to the /pub/errors folder in the Magento 2 directory. Find the file – local.XML.sample – and change it to – local.xml
Now, refresh your error page, and you should be able to see the list of errors like so:
[2020-12-12 22:35:20] main.CRITICAL: Class Magento\Framework\App\Http\Interceptor does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magento\\Framework\\App\\Http\\Interceptor does not exist at /home/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:24)"} []
The code will show the specific errors you need to debug. You developers can easily solve the issue.
However, if you find it too complicated, please paste it into the comment box and let our developers take a look.
Wrap Up
The error notifications are there to protect your store from the issues. They hide the issues behind the vague messages. The store owners know to find the exact error and resolve it.
Exception printing is one such error.
I hope this quick tutorial helped you to solve exception printing is disabled by default for security reasons.
If you encounter any issue resolving it, feel free to post it in a comment.