Handling Magento errors

20. Januar 2015 at 09:35

magento ecommerce logo

Magento ships with a new feature, which effectively hides errors from your visitors. If some kind of error occurs – a PHP Fatal Error, or PHP Notice Error, or database error – the actual error is written to file and not shown on screen. But when developing Magento sites, this behaviour might actually become annoying. Luckily you can easily re-enable the error-displaying again.

Showing errors anyway

Displaying the error on screen is much easier to work with. To enable the error-displaying again, navigate to the errors-folder in the Magento root, and rename the file local.xml.sample to local.xml. The XML-file should contain a line similar to this:


You can see that the action here is configured to print the message on screen, while the original dump is also left on the filesystem (in var/cache). You could also change the XML-code a bit to remove the dump-file instead:


Mail me if an error occurs

Even cooler is that the XML-code also allows you to define an email-address to which mail should be sent if some error occurs:

<subject>Whoops, something went wrong in Magento</subject>

Those of you who have wondered why errors were displayed using the original skin, can also see that the skin can be changed as well here:


Hope you find this all usefull.

Please share this article von facebook & google plus or where you want, thank you!

Guide to CSS Support in Email-Clients

5. November 2009 at 09:25

HTML-Emails eigenen sich super zur erweiterten Formatierung. Dabei ist zu beachten dass nicht alle E-Mail-Clients (egal ob Web oder Desktop-Anwendung) die selben CSS-Styles unterstützen. Um Überraschungen zu vermeiden sollte dies berücksichtigt werden.

Eine Übersicht der von den einzelnen E-Mail-Client unterstützten CSS-Styles findet ihr hier.