{"id":11446,"date":"2015-02-12T01:10:25","date_gmt":"2015-02-12T06:10:25","guid":{"rendered":"http:\/\/info.template-help.com\/?p=11446"},"modified":"2016-02-22T05:53:57","modified_gmt":"2016-02-22T10:53:57","slug":"magento-how-to-display-error-messages","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/magento-how-to-display-error-messages.html","title":{"rendered":"Magento. How to display error messages"},"content":{"rendered":"<p><\/p>\r\n<p>This tutorial will show you how to display error messages in Magento.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=QLaXy5dJHhc?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to display error messages<\/a><\/p>\r\n<p>To make the error readable and easier to understand, please do the following:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-11.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-11-300x203.jpg\" alt=\"magento-error-display-1\" width=\"300\" height=\"203\" class=\"aligncenter size-medium wp-image-41096\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-11-300x203.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-11-150x101.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-11.jpg 954w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<ol>\r\n<li>\r\n<p>Open your Magento installation directory. Go to the <strong>errors<\/strong> folder.<\/p>\r\n<\/li>\r\n<li>\r\n<p> Rename <strong>local.xml.sample<\/strong> file to local.xml.<\/p>\r\n<\/li>\r\n<li>\r\n<p> Refresh the error page in browser.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-21.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-21-300x203.jpg\" alt=\"magento-error-display-2\" width=\"300\" height=\"203\" class=\"aligncenter size-medium wp-image-41097\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-21-300x203.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-21-150x101.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2011\/10\/magento-error-display-21.jpg 954w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Now you can use the error text and search our <a href=\"\/help\/ecommerce\/magento\/magento-tutorials\/\" target=\"_blank\">Help Center<\/a> or <a href=\"http:\/\/www.google.com\/\" target=\"_blank\">Google<\/a> for a solution.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>However, sometimes renaming the <strong>local.xml.sample<\/strong> file is not working. There is another solution which we can use to display errors in Magento:<\/p>\r\n<ol>\r\n<li>\r\n<p>Open your Magento installation directory. Locate and open <strong>index.php<\/strong> file.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Search for <strong>error_reporting(E_ALL | E_STRICT); <\/strong> code.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Comment it out like that:<\/p>\r\n<pre class=\"brush:php\">\r\n\/*error_reporting(E_ALL | E_STRICT);*\/\r\n<\/pre>\r\n<\/li>\r\n<li>\r\n<p>And use the following code instead:<\/p>\r\n<pre class=\"brush:php\">\r\nerror_reporting(E_ALL);\r\n$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;<\/pre>\r\n<\/li>\r\n<li>\r\n<p>Also, locate the following code:<\/p>\r\n<pre class=\"brush:php\">#ini_set('display_errors', 1);<\/pre>\r\n<\/li>\r\n<li>\r\n<p>Uncomment it by removing the <strong>#<\/strong> sign, so it looks like that:<\/p>\r\n<pre class=\"brush:php\">ini_set('display_errors', 1);<\/pre>\r\n<\/li>\r\n<li>\r\n<p>Save this file and upload to the server. Reload your website page to see errors.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Now you know how to display error messages in Magento.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=QLaXy5dJHhc?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to display error messages<\/a><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to display error messages in Magento.<\/p>\n","protected":false},"author":12,"featured_media":43726,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[729],"tags":[894,691,2407,1087],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/11446"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=11446"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/11446\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/43726"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=11446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=11446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=11446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}