Archive for the ‘Magento eCommerce Tips’ Category



You see an XML error either on your screen or in your system.log but, you do not know which XML file has caused it? These tips should help you get started:
  • Edit this file on line 432
    [magento root]/app/code/core/Mage/Core/Model/Layout/Update.php
    add this code:
    1if (!$fileXml instanceof SimpleXMLElement) {
    2    <span style="background-color: yellow">// add this log statement - ensure to enable error logging on your shop Mage::log(print_r($filename, true));</span>
    3    continue;
    4}
  • Edit this file on line 515
    [magento root]/lib/Varien/Simplexml/Config.php
    1if ($xml instanceof Varien_Simplexml_Element) {
    2    $this->_xml = $xml;
    3    return true;
    4}<span style="background-color: yellow"else // add this else statement to the if - ensure to enable error logging on your shop Mage::log(print_r($string, true)); }</span>
  • Clear the Magento cache and reload the page you are working on
  • Now check your /var/lib/system.log file – you should see the XML filename or the XML string that is causing the error.
Additional Help:
As you must have guessed from the file names of the above files:
  • If the error is from this file:
    [magento root]/lib/Varien/Simplexml/Config.php on line 510
    then it, means there is an error in one of your module config files. Check one of these config.xml files:
    • [magento root]/app/etc/modules/config.xml
    • [module path]/etc/config.xml
  • If the error is from this file:
    [magento root]/app/code/core/Mage/Core/Model/Layout/Update.php on line 431
    then, there is an error in your theme layout XML file.
Hope, this helps you debug faster.

Note: This content is originally taken from site "sree.cc/category/magento_ecommerce_tips"
Click here for more Tips...

Archive for the ‘Magento eCommerce Tips’ Category Archive for the ‘Magento eCommerce Tips’ Category Reviewed by Web Technology Funda on 6:26:00 AM Rating: 5

1 comment

  1. Such a nice technical in formation about php zend development its wrathful for those who are working in offshore software development company

    ReplyDelete

Free! Free!Free! Subscribe to Get Free PHP (Magento) tutorial Update in Your Inbox!!! Hurry Up!!!