-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: A page URL key "home" (id 2) for specified store already exists.. #2
Comments
Actually the original error message is "A page URL key for specified store already exists." - I just added more info to find out what's going on. But in fact, these seems to come from Magento core code... |
This can happen if you try to merge data from two systems with different IDs for a page with the same identifier (i.e. "home"). I experienced this too once. Could this be your problem too? |
I got this when checking on only one system. I am not sure if I did export or import first. But it was a almost clean Magento install. Have to check this with a completely clean Magento install again. |
I can reproduce the issue in the current master, on a completely clean magento 1.7.0.2 with sample data, installed by n98-magerun. First command after installation: php contentsync.php export |
The problem is that I have a page "home" for store 0 which is disabled and another one for the stores which is enabled. This is valid (I just can not enable the other "home" page in the backend) |
Ah, thanks for the info, that clarifies things. |
There is a workaround: Save both of those coexisting CMS home pages once - then it exports data. |
Somehow it is a magento bug :-) Mage_Cms_Model_Resource_Page::getIsUniquePageToStores public function getIsUniquePageToStores(Mage_Core_Model_Abstract $object) { if (Mage::app()->isSingleStoreMode() || !$object->hasStores()) { $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID); } else { $stores = (array)$object->getData('stores'); } When contentsync saves the CMS page (in order to update the hash), $_data['stores'] is not set. When saving the CMS page from the admin interface, I think this comes from the admin form. So I think in my "special" (or not so special?) database constellation, I would guess that it is not possible to save this CMS page at all. The question is if contentsync should work around that by filling the stores array from $_data['store_id'] |
I am getting this error:
Error: A page URL key "home" (id 2) for specified store already exists..
It is pretty much the standard Magento demo data.
The text was updated successfully, but these errors were encountered: