Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

update.php urgent help needed
 
kooljp
Jr. Member
 
Total Posts:  26
Joined:  2009-12-30
Melbourne, Australia
 

Hi all

our site http://www.streetsense.com.au is currently down:

Error reads:

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 70: parser error : Opening and ending tag mismatch: default line 59 and reference in /home/streetex/public_html/app/code/core/Mage/Core/Model/Layout/Update.php on line 294
Trace:
#0 /home/streetex/public_html/app/code/core/Mage/Core/Model/Layout/Update.php(294): mageCoreErrorHandler(2, ‘simplexml_load_...’, ‘/home/streetex/...’, 294, Array)
#1 /home/streetex/public_html/app/code/core/Mage/Core/Model/Layout/Update.php(320): Mage_Core_Model_Layout_Update->fetchFileLayoutUpdates(’fetchPackageLayoutUpdates()
#3 /home/streetex/public_html/app/code/core/Mage/Core/Model/Layout/Update.php(224): Mage_Core_Model_Layout_Update->merge(’default’)
#4 /home/streetex/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(265): Mage_Core_Model_Layout_Update->load(’default’)
#5 /home/streetex/public_html/app/code/core/Mage/Cms/Helper/Page.php(83): Mage_Core_Controller_Varien_Action->loadLayoutUpdates()
#6 /home/streetex/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage()
#7 /home/streetex/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Cms_IndexController->indexAction(Object(Mage_Cms_IndexController), ‘home’)
#8 /home/streetex/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch()
#9 /home/streetex/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(’index’)
#10 /home/streetex/public_html/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch(Object(Mage_Core_Controller_Request_Http))
#11 /home/streetex/public_html/index.php(85): Mage::run()
#12 {main}

This is the update.php file from line 294 (what is causing the error?)

$fileStr = file_get_contents($filename);
$fileStr = str_replace($this->_subst[’from’], $this->_subst[’to’], $fileStr);
$fileXml = simplexml_load_string($fileStr, $elementClass);
if (!$fileXml instanceof SimpleXMLElement) {
continue;
}
$layoutStr .= $fileXml->innerXml();

#$layoutXml->appendChild($fileXml);
}
$layoutXml = simplexml_load_string(’<layouts>’.$layoutStr.’</layouts>’, $elementClass);

$this->_packageLayout = $layoutXml;

if (Mage::app()->useCache(’layout’)) {
Mage::app()->saveCache($this->_packageLayout->asXml(), $cacheKey, $cacheTags, null);
}
}

return $this;
}

public function fetchPackageLayoutUpdates($handle)
{
$_profilerKey = ‘layout/package_update: ‘.$handle;
Varien_Profiler::start($_profilerKey);

if (empty($this->_packageLayout)) {
$this->fetchFileLayoutUpdates();
}
foreach ($this->_packageLayout->$handle as $updateXml) {
#echo ‘<textarea style="width:600px; height:400px;">’.$handle.’:’.print_r($updateXml,1).’</textarea>’;
$this->fetchRecursiveUpdates($updateXml);

$this->addUpdate($updateXml->innerXml());
}

Varien_Profiler::stop($_profilerKey);

return true;
}

public function fetchDbLayoutUpdates($handle)
{
$_profilerKey = ‘layout/db_update: ‘.$handle;
Varien_Profiler::start($_profilerKey);

try {
$updateStr = Mage::getResourceModel(’core/layout’)->fetchUpdatesByHandle($handle);
if (!$updateStr) {
return false;
}
$updateStr = str_replace($this->_subst[’from’], $this->_subst[’to’], $updateStr);
$updateXml = simplexml_load_string($updateStr, $this->getElementClass());
$this->fetchRecursiveUpdates($updateXml);

$this->addUpdate($update);
} catch (PDOException $e) {
throw $e;
} catch (Exception $e) {

}

Varien_Profiler::stop($_profilerKey);
return true;
}

public function fetchRecursiveUpdates($updateXml)
{
foreach ($updateXml->children() as $child) {
if (strtolower($child->getName())==’update’ && isset($child[’handle’])) {
$this->merge((string)$child[’handle’]);
}
}
return $this;
}
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gruik
Member
 
Total Posts:  60
Joined:  2009-12-16
France
 

Hi,

I think you have an XML error in one of the modules’ config files. If you’re creating your own module, check your xml module configuration. If you just installed a new module, disable it in the right xml file under the app/etc/modules/

 
Magento Community Magento Community
Magento Community
Magento Community
 
kooljp
Jr. Member
 
Total Posts:  26
Joined:  2009-12-30
Melbourne, Australia
 

actually I did try to install this extension at around the same time the error happened.

http://www.magentocommerce.com/extension/2358/newsletter-address-import

The extension actually failed to install in Magento connect.

So how to I check and remove it completely?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gruik
Member
 
Total Posts:  60
Joined:  2009-12-16
France
 

Extensions installed by Magento Connect can be uninstalled by the extension downloader, but since you don’t have access to any page, you’ll have to disable the extension manually first
I think editing “app/etc/modules/<Company>_<Module>.xml” and setting “<active>” to false should disable it
Also, the cache needs to be cleared to take in count that change, removing everything under “var/” should do it

 
Magento Community Magento Community
Magento Community
Magento Community
 
kooljp
Jr. Member
 
Total Posts:  26
Joined:  2009-12-30
Melbourne, Australia
 

Thanks for trying to help Gruik!

I actually do have access to the backend admin pages, and the extension is actually NOT there to remove, it is also not visible in “app/etc/modules/<Company>_<Module>.xml”

Must be something else??

What does this error actually mean?
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 70: parser error : Opening and ending tag mismatch: default line 59 and reference in /home/streetex/public_html/app/code/core/Mage/Core/Model/Layout/Update.php on line 294

Thanks

Jon
Street Sense

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gruik
Member
 
Total Posts:  60
Joined:  2009-12-16
France
 

Oh sorry, seems that it’s more like a theme than an extension. The error means one of the xml files is malformed (corrupted or something). The php file causing this error makes me think it’s on of the “xml layout update file” (files under “layout/” in themes).
If you configured this theme to be used (in Configuration / Design), just reset fields to the default.
If you erased the default theme, the simplier would be to make a fresh Magento install

 
Magento Community Magento Community
Magento Community
Magento Community
 
ckosny
Guru
 
Total Posts:  349
Joined:  2009-02-28
Luxembourg
 

Hello Jon

just in case Gruiks suggestion does not fix it, it might be worth it trying to find out which layout file is causing the problem. 
If you know some PHP, change the Update.php such that it writes the content of $filename into a log file on your server - best directly before the call to simple_xml_load_string. Then after the call to simple_xml_load_string log whether the call was successful or not. This way you should be able to find out which file is causing the problem which again might indicate a way to fix it.

Don’t forget to make a backup of the file Update.php before editing it.

Good luck

Claudia

 
Magento Community Magento Community
Magento Community
Magento Community
 
kooljp
Jr. Member
 
Total Posts:  26
Joined:  2009-12-30
Melbourne, Australia
 

Sorry guys/girls
I don’t really know PHP that well at all.

Magento was running fine...now this error....damn, I can’t afford to be losing live traffic....

I may have to pull the pin on Magento.....it all appears too technical with little written documentation and “plain English” support for newbies like me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kooljp
Jr. Member
 
Total Posts:  26
Joined:  2009-12-30
Melbourne, Australia
 

Special thanks to ckosny for her kind help via PM in completely fixing the problem for me.

Cheers
Jon
Street Sense

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top