1. Home
  2. Prices
  3. Guided Tour
  4. New Shop
  5. Shop Review
  6. Ecommerce Marketing
  7. Ecommerce TV
  8. Magento Developers
  9. Portfolio
  10. Blog
  11. Contact
Home > Magento, Magento Tutorials > Magento Layout Error Recovery

Magento Layout Error Recovery

Posted on: 22nd Jan 2010 By: Adam Moss Leave a comment 5 Comments

Being a hugely complex system of files and functions, when Magento suddenly goes into error mode – that dreaded page that we are all aware of – it can sometimes be difficult to identify what’s gone wrong. One which I came across recently came completely out of the blue and was related to XML files in the layout folder.

The error appeared like this:

Magento Error

The error output read:

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 106: parser error :
StartTag: invalid element name
in /var/www/vhosts/mywebsite.co.uk/httpdocs/app/code/core/Mage/Core/Model/Layout/Update.php on line 294

The main reason why I wanted to post about this error is that there is absolutely no solution to it anywhere on the Internet, so it requires addressing. As I said, the error relates to modifications made in the /layouts folder as the function in Update.php: ‘public function fetchFileLayoutUpdates()’.

If this error appears you need to restore your layout XML files to their original states – then I would suggest re-inserting your edits one at a time, ensuring that no mistakes are made.

  • Twitter
  • AIM
  • WordPress
  • LinkedIn
  • Facebook
  • StumbleUpon
  • Technorati Favorites
  • Delicious
  • Ping
  • Digg
  • Bebo
  • Reddit
  • MySpace
  • NewsVine
  • Google Bookmarks
  • Sphinn
  • Propeller
Categories: Magento, Magento Tutorials Tags:

5 Responses to “Magento Layout Error Recovery”

  1. Snow

    Hi Adam,

    I have this same warning message. The last time it occurred we restored the site and every thing was up and running. This happened again now after 3 months when I tried to update the store name under admin/System/Manage Stores. I am not sure why this error is occurring often.

    Can you please advise.

    Thanks for your help.

  2. Adam

    Hmm, I’m not entirely sure. Is it exactly the same error as the one I reported or is it slightly different. If it’s exactly the same you could benefit from restoring the XML files as I did.

    Let me see the error if you can.

  3. Mike

    I think your on to something with it being related to the store name. That was more or less the only change I made this morning, and I am running into a similar issue. Here is mine:

    Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 43: parser error : StartTag: invalid element name in /home/XXXXXX/XXXXXX/app/code/core/Mage/Core/Model/Layout/Update.php on line 431

    Any thoughts?

  4. Adam Moss

    Hi Mike, have you tried downloading the latest version of Magento and restoring all your XML files. I’ve now had this error crop up twice and an XML restore has worked perfectly both times.

  5. chx

    The same problem happened to my website today when I was creating custom module.
    The problem is in the xml file in the /app/etc/modules/
    The xml file started with:

    instead of

    **note that <? must have no space in between**

    After that, I need to disable the module, before deleting it (direct deletion won't make the problem go away).
    To disable it, write "false" instead "true" in the xml file of the new module:
    false

Post A Comment