How to resolve exception printing is disabled by default for security reasons in Magento 2.
- What Does Exception Printing is Disabled by Default for Security Reasons Mean?
- What Causes Magento exception printing is disabled by default for security reasons?
- Fixing exception printing is disabled by default for security reasons
- Enable Exception Printing in Magento 2
- Enable Exception printing in Magento 1
- Conclusion
Magento 2 users encounter exception printing is disabled by default for security reasons when attempting to update either Magento 2 or a theme or module on their store.
Fortunately, you can fix this error by following the simple process described below.
- What Does Exception Printing is Disabled by Default for Security Reasons Mean?
- What Causes Magento exception printing is disabled by default for security reasons?
- Fixing exception printing is disabled by default for security reasons
- Enable Exception Printing in Magento 2
- Enable Exception printing in Magento 1
- Conclusion
What Does Exception Printing is Disabled by Default for Security Reasons Mean?
Magento users often see this notification when they try to install a new theme or a module on their store. Some users even see it when updating Magento to the latest version.
This notification indicates that there is a conflict within your Magento installation. While this notification doesn’t point toward a critical error, you should go through the resolution process to avoid escalating the issue into something that could potentially break your store.
What Causes Magento exception printing is disabled by default for security reasons?
The notification often arises when updating or installing a module or theme. During the process, Magento encounters an internal conflict between the components and raises the notification you see on the front end.
Another cause of this notification is the cache-related issues that could pop up when updating store components.
Fortunately, these underlying issues can be easily fixed by following the steps in the next section.
Fixing exception printing is disabled by default for security reasons
Important: Before attempting the steps, it is always good to check with your developers. If you have developers managing your server, it’d be best to ask them to fix this issue.
Clear the Cache
This fix applies to both Magento 1 and Magento 2.
Go to Magento Admin > System > Cache Management > Flush Cache Storage to flush the cache.
Alternatively, you can remove the cache folders via SSH or SFTP.
- Connect your server via SSH
- Go to /var/cache in the webroot of your application.
- Run the following command to remove the cache folders:
rm -rf *
- Delete everything in the folder
Refresh the site and confirm whether the notification is no longer visible on the front end.
- Connect your server via SFTP
- Go to /var/cache in the webroot of your application.
- Ctrl+A to select all folder
- Hit Delete to delete everything in the folder
Enable Exception Printing in Magento 2
If the above fix doesn’t work, you must dig deeper and determine the exact error causing the notification. This requires Magento to enable exception printing.
Step 1: Switch to Developer Mode
- Go to the Magento command line and type the following command:
bin/magento deploy:mode:set developer
Step 2: Rename local.xml.sample
- Go to the /pub/errors folder
- Find the file xml.sample.
- Rename this file to xml.
Step 3: Refresh the Error Page
Refresh the page, and you’ll see the error(s) description. This allows you to drill down to the issue and fix the actual error flagging the notification.
Enable Exception printing in Magento 1
The process is similar to Magento 2. You must enable the developer mode and rename local.xml.sample to local.xml.
You’ll see the error you need to fix to resolve the notification.
Conclusion
Exception printing is disabled by default for security reasons Magento might be a scary error to many Magento users. However, it is an indication that there is something wrong with the Magento installation. You can quickly fix the issue by reviewing the proposed fixes in this article.
Let us know if you need help resolving the specific Magento error(s) you might discover during the process. Also, learn about ecommerce security threats and tips to protect your site.
If you are looking for a new cloud hosting platform for your store, check out Devrims Managed Magento Hosting.