Home > Magento > Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists

Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists

November 28th, 2008

I’ll be short on this one. For those of you in Magento theme developement, if you ever see this message

Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists

Most likely you have layout problem. So dive into your theme /layout folder and quick check to see if it relly is the messed up layout in your theme is to rename entire /layout folder to something like /_layout. This way Magento will propagate to using default theme /layout folder. If the refresehed page now works, you located the error to be in /layout folder. Now do the same for few of the files inside the layout folder.

In my example I have added the following into catalog.xml under section

<remove name=”tags_popular” />

And that caused my Customer page to be broken after customer logs in.

Hope this help someone.

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

Related articles

Magento , ,

  1. December 22nd, 2008 at 14:26 | #1

    Thanks a lot, this got me focussed on the tags from which one caused the problem described in your post.

    Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists

    on Layout.php line 165.

    Again, thanks.

    Kind regards,

    Pim Schaaf

  1. No trackbacks yet.