Magento Change Error Page Layout
Contents |
/ Intermediate / GuideTweetCustomizing the Magento Error Report and Maintenance PageBy Robert Popovic on July 4, 2011 / 40 CommentsIn this tutorial, we will expand on the material Kristof already covered a while ago since there are some neat magento custom maintenance page additional options available to us.If you've worked with Magento for any length of magento test error page time, you will most certainly be familiar with the dreaded "There has been an error processing your request" page. magento maintenance extension Clearly, the goal is to make sure that this page never appears to our online customers on a live site, but, on occasion it may still show up. For example if you've
Magento Error Reporting
just sent out a newsletter and have an onslaught of visits, if your server runs out of MySQL connections, your visitors will still see this page.Similarly, Magento provides an easy way to show a maintenance page. All you have to do is create an empty file called maintenance.flag in your Magento document root and your site will be redirected to the built in maintenance page.This magento maintenance mode allow ip is all well but as part of a professional solution for your clients, we would like to be able to customize these pages so that they are more in line with the design of the site. Luckily, it is very easy to customize these templates. The principle is very similar to customizing a standard Magento skin folders, so, let's dig into it.Note that the Magento version used for this tutorial is 1.5.1. Structure of the Error PagesThe error report and maintenance pages are rendered from template located under [MAGENTO_ROOT]/errors. As you can see from the screenshot, the folder contains some php files and a folder called default that reminds us of the way the normal Magento skin folders are structured. You will notice that the skin folder also contains files with the same name as the error root folder. The difference between them is that the files in the error root are just there to route the specific page processing. They include the processor.php file, instantiate the report class and call the appropriate method which in turn will render the actual page template. For example, the 503.php file has these thre
custom design for the error “report”
Magento 503 Service Temporarily Unavailable
page of Magento. Another reader, from PILLWAX Industrial Solutions Consulting gave us this solution. http://magebase.com/magento-tutorials/customizing-the-magento-error-report-and-maintenance-page/ Edit: This post was originally written for.. well, actually I have no idea what version of Magento was around back then.. maybe 1.4? But since then the /report https://www.nicksays.co.uk/magento-how-to-custom-error-page-design/ directory has changed to the /errors directory, so keep that in mind! Create the layout First we need to create a layout file. This is called design.xml, is placed in the /report directory and has the following content. error.phtml Create the template The current report template is held in /report/skin/default/index.phtml. Let’s make a copy of that index.phtml and call it error.phtml. We can then make all of the necessary improvements to the the template in error.phtml. We’re done!
to be disabled in your browser. You must have JavaScript enabled in your browser to utilize the functionality of this website. Home Blog Custom Magento error page Loading, please wait... Sometimes, the unthinkable happens and an error occurs in your Magento https://www.fontis.com.au/blog/custom-magento-error-page system, causing everything to come grinding to a halt. Magento handles this by displaying a styled error page, which is better looking than a white page full of error text. However, the error page still doesn't look very professional, and potentially discloses information that could be abused by a malicious user. This post details a method for using a custom error page, and outlines some of the benefits of doing so. Here is an example of the error page standard Magento error page: The method we will use for a customised error page relies on the Apache web servers rewrite rules - if mod_rewrite is not enabled then this won't work (see our post on installing Magento for more information about mod_rewrite). The basic idea is to rewrite any URL in the report directory to display a specific error page which you define. This allows you to create a more friendly message for users who have been magento change error unfortunate enough to run into an error. First, create a 503.html page in your document root (usually a public_html/ or www/ directory), or some other area the web server has access to, such as the Magento root directory. This should probably be a static HTML page rather than anything dynamic (i.e. PHP) to minimise the chance of the problem also preventing the error page from being served! Next, add the following rule to the start of your Magento .htaccess file: ErrorDocument 503 /path/to/file/503.html Then, place this rule: RewriteRule ^report/.* 503.html [L,R=503] into the following code like so: ############################################ ## you can put here your magento root folder ## path relative to web root #RewriteBase /magento/ ############################################ ## rewrite errors to 503 error document RewriteRule ^report/.* 503.html [L,R=503] ############################################ ## workaround for HTTP authorization ## in CGI environment This will then redirect any requests for an error report page using a 503 response code (Service Unavailable) and display the 503.html page in place of the standard Magento page. It should be noted that returning a 503 status code will also tell robots not to index the page content and to check again later, which means that your search engine rankings won't be affected. The end result is that you can serve any visitor unlucky enough to encounter an error with something more friendly than the default error page, like this: F