Magento 2 Developement

Magento 2 : How to diagnose errors

Magento 2 development could raise a lot of questions. And if you see blank screen you and don’t know how to diagnose error this article is definitely for you. Basically there are 3 variants of errors:

There has been an error processing your request

There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXX

It means that Magento 2 runs in default or production mode. You wont see the actual error message on the screen, only error report ID. Errors are logged to the file system and are never displayed to the user. Detailed error report could be found in the var/reports folder.

More about error reporting in Magento 2

Magento 2 interface does not respond to any actions

It means you have javascript error. You need to check browser developer console for error message. Chrome console can be shown by pressing F12.
developer console
More about Chrome developer console

You see blank screen

It could be either javascript or server error. You check if it is javascript error by checking browser developer console. For server error you can do :

– enable display_errors from app/bootstrap.php file line 11 – remove # from starting.
– check that error_reporting from app/bootstrap.php file line 10 set to E_ALL
– switch magento 2 to developer mode
– check error logs in var/log folder ( var/log/exception.log )

You might be also interested in

Magento 2 Setup Compile Errors
Magento 2 Command-Line Interface (CLI) Commands List

Leave a Reply

Your email address will not be published. Required fields are marked *