I am getting these errors in system.log.
2017-06-20T11:59:55+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in home/www/lib/Varien/Simplexml/Config.php on line 512
2017-06-20T11:59:55+00:00 ERR (3): Warning: simplexml_load_string(): in /home/www/lib/Varien/Simplexml/Config.php on line 512
2017-06-20T11:59:55+00:00 ERR (3): Warning: simplexml_load_string(): ^ in /home/www/lib/Varien/Simplexml/Config.php on line 512
I tried debugging them by adjusting the loadstring function in the config.php file:
public function loadString($string)
{
if (is_string($string)) {
$xml = simplexml_load_string($string, $this->_elementClass);
if(!$xml){
Mage::log('XML_ERROR: ' . $string);
}
if ($xml instanceof Varien_Simplexml_Element) {
$this->_xml = $xml;
return true;
}
} else {
Mage::logException(new Exception('"$string" parameter for simplexml_load_string is not a string'));
}
return false;
}
The response in the system.log is not pointing to any logic location or file. How to debug this:
2017-06-20T11:59:56+00:00 DEBUG (7): XML_ERROR: ’°# . ½; ô..
2017-06-20T11:59:57+00:00 DEBUG (7): XML_ERROR: <config/>
Changed the error login as sugested in the comments. This is what the response is now:
2017-06-20T12:43:51+00:00 ERR (3): Notice: Undefined variable: classblock in /home/www/app/code/local/Cmsmart/Megamenu/Block/Navigation.php on line 186
2017-06-20T12:43:51+00:00 ERR (3): Notice: Undefined variable: nothumbnail in /home/www/app/code/local/Cmsmart/Megamenu/Block/Navigation.php on line 84
2017-06-20T12:43:51+00:00 ERR (3): Notice: Undefined variable: classblock in /home/www/app/code/local/Cmsmart/Megamenu/Block/Navigation.php on line 186
2017-06-20T12:43:51+00:00 DEBUG (7): LibXMLError Object
(
[level] => 3
[code] => 4
[column] => 1
[message] => Start tag expected, '<' not found
[file] =>
[line] => 1
)
2017-06-20T12:43:53+00:00 DEBUG (7): LibXMLError Object
(
[level] => 3
[code] => 4
[column] => 1
[message] => Start tag expected, '<' not found
[file] =>
[line] => 1
)
Got this error:
2017-06-20T14:19:51+00:00 DEBUG (7): LibXMLError Object
(
[level] => 3
[code] => 4
[column] => 1
[message] => Start tag expected, '<' not found
[file] => ./app/design/frontend/default/theme313k/layout/cmsmart
[line] => 1
)
This is the corresponding file contents. I don't see anything wrong with that file. Also tried to remove whitespaces etc.
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="top.menu" >
<action method="unsetChild" ><name>catalog.topnav</name> </action>
<block type="page/html_topmenu" name="catalog.topnav2" template="page/html/topmenu_2.phtml"/>
<block type="megamenu/navigation" name="catalog.topnav.megamenu">
<action method="unsetData"><key>cache_lifetime</key></action>
<action method="unsetData"><key>cache_tags</key></action>
</block>
</reference>
</default>
</layout>
Best Answer
Please check your
config.xml
,system.xml
and all thelayout.xml
files.For debugging you can try this ... create file in magento root
Output looks like
Source: http://www.php.net/manual/en/function.libxml-use-internal-errors.php
Edit: check all XML files ...