If you’ve been working with Magento extensions or layout,
you might have encountered the frustration of trying to find out which
XML generates the following error, potentially harming the whole magento
installation :
01 | Warning:
simplexml_load_string() [function.simplexml-load-string]: Entity: line
61: parser error : StartTag: invalid element name in
C:\aa_work\RueDeSiam\www\lib\Varien\Simplexml\Config.php on line 502 |
03 | #0
C:\aa_work\RueDeSiam\www\lib\Varien\Simplexml\Config.php(502):
mageCoreErrorHandler(2, 'simplexml_load_...', 'C:\aa_work\RueD...', 502,
Array) |
04 | #1
C:\aa_work\RueDeSiam\www\lib\Varien\Simplexml\Config.php(489):
Varien_Simplexml_Config->loadString('?????? ...',
'Mage_Core_Model...') |
05 | #2
C:\aa_work\RueDeSiam\www\app\code\core\Mage\Adminhtml\Model\Config.php(102):
Varien_Simplexml_Config->loadFile('?????? ...',
'Mage_Core_Model...') |
06 | #3
C:\aa_work\RueDeSiam\www\app\code\core\Mage\Adminhtml\Model\Config.php(63):
Mage_Adminhtml_Model_Config->_initSectionsAndTabs('C:\aa_work\RueD...') |
07 | #4
C:\aa_work\RueDeSiam\www\app\code\core\Mage\Adminhtml\controllers\System\ConfigController.php(70):
Mage_Adminhtml_Model_Config->getSections() |
08 | #5
C:\aa_work\RueDeSiam\www\app\code\core\Mage\Core\Controller\Varien\Action.php(367):
Mage_Adminhtml_System_ConfigController->editAction(NULL) |
09 | #6
C:\aa_work\RueDeSiam\www\app\code\core\Mage\Core\Controller\Varien\Router\Admin.php(143):
Mage_Core_Controller_Varien_Action->dispatch() |
10 | #7
C:\aa_work\RueDeSiam\www\app\code\core\Mage\Core\Controller\Varien\Front.php(158):
Mage_Core_Controller_Varien_Router_Admin->match('edit') |
11 | #8
C:\aa_work\RueDeSiam\www\app\Mage.php(457):
Mage_Core_Controller_Varien_Front->dispatch(Object(Mage_Core_Controller_Request_Http)) |
12 | #9 C:\aa_work\RueDeSiam\www\index.php(66): Mage::run() |
the problem with this kind of error is that it doesn’t tell you which
file is causing the error. To find out, work with your local
installation
- set the developer mode in index.php : Mage::setIsDeveloperMode(true);
- open the app/code/core/Mage/Adminhtml/Model/Config.php and let the
_initSectionsAndTabs tell you which xml is being loaded in the modules
loop, just after $configFile is defined : echo $configFile;
- the last file that pops before the error is thrown out is likely to cause the breakout !
No comments:
Post a Comment