8

I was able to login into Admin and see the website albeit without any data or graphics.

shortly I received this message:

Exception printing is disabled by default for security reasons

I don't have a /errors folder in my Magento root directory.

10

Exception errors are stored as number named files in var/report/ except if the directory permissions are so messed up that Magento either cannot write there or tries to store its cache in the system /tmp directory.

Use an sftp client to locate and read the files in the var/report/ directory.

The hack used in Magento 1.x to show the stack trace on screen instead of writing it to a file is a security hole if not reversed on a live site. The best example available in the old Magento forums was a stack trace posted with clearly visible login credentials. Bad if you get a Google Dork (archived stack trace) off it.

For Magento 2, /errors/local.xml is moved to /pub/errors/local.xml

Copy local.xml.sample to local.xml and make modifications to fit your server environment.

enter image description here

  • You can also set Magento for developer mode to display errors in the browser. magento deploy:mode:set developer – Steve Johnson Nov 25 '15 at 14:57
  • For Magento 2, /errors/local.xml is moved to /pub/errors/local.xml I did find the /pub/errors folder but the errors folder was blank and did not have any files in it. – George Ng Dec 9 '15 at 6:22
  • 1
    If pub/errors/ is empty, you have a partial install. See added image for what you're missing. It's probably related to why the site is throwing report errors. Magento 2.0 weighs in at a whopping 223 MB (234,020,733 bytes) at 41,237 Files, 17,063 Folders. You upload the whole archive to the server and untar it on the system, sftp or downloader installs are guaranteed to fail with that much overhead. – Fiasco Labs Dec 10 '15 at 2:55
2

For Magento 2.0, error folder is not located in Magento/errors but in pub/errors/ So, just like Magento 1, to enable printing errors we need to rename pub/errors/local.xml.sample to pub/errors/local.xml

You can also turn on Magento developer mode by entering this line in Magento CLI

php bin/magento deploy:mode:set developer

Now you can refresh the error page and the error log will be something like this

Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute, instance of Mage_Eav_Model_Entity_Attribute given, called in /magento/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php on line 114 and defined  in /magento/app/code/core/Mage/Eav/Model/Attribute/Data.php on line 59

#0 /magento/app/code/core/Mage/Eav/Model/Attribute/Data.php(59): mageCoreErrorHandler(4096, 'Argument 1 pass...', '/var/www/vhosts...', 59, Array)
#1 /magento/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php(114): Mage_Eav_Model_Attribute_Data::factory(Object(Mage_Eav_Model_Entity_Attribute), Object(Mage_Sales_Model_Order_Address))
#2 /magento/app/code/core/Mage/Customer/Model/Address/Abstract.php(337): Mage_Customer_Block_Address_Renderer_Default->render(Object(Mage_Sales_Model_Order_Address))
#3 /magento/app/code/core/Mage/Customer/Model/Address/Abstract.php(326): Mage_Customer_Model_Address_Abstract->format('html')
#4 /magento/app/design/adminhtml/default/quickcheckout/template/sales/order/view/info.phtml(163): Mage_Customer_Model_Address_Abstract->getFormated(true)
#5 /magento/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')

Reference source: https://magenhosting.com/tutorial/fix-magento-exception-printing-is-disabled-by-default-for-security-reasons-in-magento-2

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.