I was able to find this question that seems to be similar to my problem, however, my problem is different.
I'm migrating a site from Magento 1.4 to Magento 1.9. To perform this migration I've tried doing an incremental update with magerun. I've also tried to start with a fresh Magento 1.9 install and then transfer over the themes, plugins, and the database. With both situations I'm getting an error:
a:5:{i:0;s:37:"Element with id "path" already exists";i:1;s:5595:"#0 /web/virtual-servers/xxxxxxxxxxxxxxx.net/www_home/lib/Varien/Data/Form/Element/Abstract.php(58): Varien_Data_Form->checkElementId('path')
I tried removing all of the old plugins and I'm still getting the same error.
What does this error mean? There don't seem to be any duplicate categories or settings in the database.
Best Answer
The error means that an element (object) was being added to a form (object), but the form requires uniquely identified elements. In Magento, you typically create a new instance of a form, then a fieldset, and append fields to the fieldset. Here's an example of how it might look in code:
The above is taken from
Mage_Adminhtml_Block_Cms_Block_Edit_Form::_prepareForm
, and you will likely see the same methodology used for all core admin form setups.The problem is that somewhere another form field with the ID of
path
is being added to a fieldset when one already exists.So you can try to search your codebase for something like this:
And see if there are easy-to-spot duplicates. A quick scan myself over the core code pool yields:
And so it's possible that your issue lies with some third-party extension that tries to modify or extend a part of the category management forms.
As I said the fields will typically be registered as part of this
_prepareForm
method, but it's also possible that within one of these classes there is an event dispatched. For example, see the end of theMage_Adminhtml_Block_Cms_Page_Edit_Tab_Content::_prepareForm
method. This exposes the form to other modules (maybe a third-party extension) that might be causing your issue.