|Configure Magento error page|
joomla template, virtuemart, phpBB styles, virtuemart, drupal theme, virtuemart, phpBB styles, virtuemart, mootools, virtuemart, phpBB styles, virtuemart, drupal theme, virtuemart, phpBB styles, virtuemart, jQuery, virtuemart, phpBB styles, virtuemart, drupal theme, virtuemart, phpBB styles, virtuemart, mootools, virtuemart, phpBB styles, virtuemart, drupal theme, virtuemart, phpBB styles, virtuemart
If a server side error occurs, Magento by default redirects to a special page that displays the error message itself and a trace. While this is useful information such a display can be quite annoying:
During development you most likely do not want to be redirected, but see the error directly on the page where it occurred. This way you can simply reload the page after fixing the error.
On the live server it is not advisable to provide any details about an error for several reasons:
- such information might give clues about how to attack the website
- it is not very user friendly; most visitors will be confused when seeing such a page
- the website admin is not informed of the error, unless a customer contacts him
Fortunately you can configure the behavior of Magento in case of errors.
Changes between Version 1.3 and 1.4
There are two major changes to the error reporting between these versions, firstly errors are no longer displayed by default and secondly error management has been moved from the /reports folder to a dedicated /errors folder in a standard install. In addition error reports now support theming and a ‘Maintenance’ page feature can now be turned on that returns a 503 error code.
Display errors on the same page (developer mode)
During development enable the developer mode so you will see all errors directly on the page where they happen.
To do this open the index.php in the root of your Magento installation and remove the comment from the line
Version 1.4 and newer
In this version an environment variable has been added to allow you to set developer mode to true on your test server, this way you don’t have to have two different copies of index.php for the two servers.
From the release notes: This variable can be set from virtualhost configuration or .htaccess: SetEnv MAGE_IS_DEVELOPER_MODE “”
The idea is that you define the variable to any value (eg an empty string) on your test server using your virtualhost config or a .htaccess file and on the live server you don’t define it anywhere. If its not defined Magento won’t use it.
Provide feedback form for visitor and send error reports via email to admin (live website)
If an error occurs Magento can email the error to someone and also display a feedback form for the visitor asking for details.
To set this up go the the file
Change this line
and add your email address in this line
Now you are done.
The next time an error occurs the following happens: Magento displays a page similar to this:
One email with the error message and the trace is sent to the configured email address. If the visitor submits the form, another email containing the submitted information is sent to the configured email address.
In this version report/config.xml has been replaced by errors/local.xml
In a fresh install there will be an errors folder containing a local.xml.sample file, copy and rename this to local.xml the modify this in the same way as the 1.3 version descibed above.
- Designing for Magento
- Data Accessing Methods from Within Various Scopes
- Adding CMS Layout Templates
- Installing Yotpo Reviews Extension
- Magento-SugarCRM integration guide
- UK Delivery Shipping Table Rates
- How To Setup UPS shipping for negotiated rates
- Configuring Weight - destination shipping rates
- Magento Sitemap - steps to improve
- SEO: Improving Magento sitemap
Recommended Web Hosting For Bloggers and Designers
I recoomended Webhostings for Bloggers and Designers because I am freelancer, working with thousand clients in the worlds. Most of them will use those hosts.
- Fast, Reliable, Affordable
- 100% Satisfaction Guarantee
- And More...