I was adding products in my store normally until the images stopped appearing on the front and when I went to see the error log what appeared was:
2015-10-28T11:40:00+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /home/espacoor/public_html/app/code/core/Mage/Core/Model/Layout/Update.php on line 444
2015-10-28T11:40:00+00:00 ERR (3): Warning: simplexml_load_string(): <?xml version="1.0"?> in /home/espacoor/public_html/app/code/core/Mage/Core/Model/Layout/Update.php on line 444
2015-10-28T11:40:00+00:00 ERR (3): Warning: simplexml_load_string(): ^ in /home/espacoor/public_html/app/code/core/Mage/Core/Model/Layout/Update.php on line 444
Below the code to the file between line 430 to 451
// custom local layout updates file - load always last
$updateFiles[] = 'local.xml';
$layoutStr = '';
foreach ($updateFiles as $file) {
$filename = $design->getLayoutFilename($file, array(
'_area' => $area,
'_package' => $package,
'_theme' => $theme
));
if (!is_readable($filename)) {
continue;
}
$fileStr = file_get_contents($filename);
$fileStr = str_replace($this->_subst['from'], $this->_subst['to'], $fileStr);
$fileXml = simplexml_load_string($fileStr, $elementClass); //Linha 444
if (!$fileXml instanceof SimpleXMLElement) {
continue;
}
$layoutStr .= $fileXml->innerXml();
}
$layoutXml = simplexml_load_string('<layouts>'.$layoutStr.'</layouts>', $elementClass);
return $layoutXml;
Does anyone have any idea why this comes out of nowhere?
-
I was able to find the error using the following code;
Mage::Log($filename, true);
right after the
if (!is_readable($filename)) {
continue;
}
By doing this all the files that were opened were register in system.log
.
I noticed that soon after a module ipgbasegratis.xml
and ipgpagsegurogratis.xml
were called the error appeared ... exactly in file ipgpagsegurogratis.xml
.
Erro no processamento de XML: nenhum elemento encontrado
Posição: file:///tmp/fz3temp-1/ipgpagsegurogratis.xml
Número da linha 1, coluna 22:<?xml version="1.0"?>
---------------------^
This file is responsible for displaying the payment mode at the end of the purchase, what else should it contain after this xml snippet? note that the error is pointing to the double quotes when it is displayed in the error log.