2

Is there a version of Magento's sample data that works with the 1.8 CE Alpha 1 release? I just installed the package and I'm seeing errors when re-indexing.

$ php shell/indexer.php --reindex catalog_url
Catalog URL Rewrites index process unknown error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-sony-vaio-vgn-txn27n-b-11-1-notebook-pc' for key 'UNQ_CATALOG_PRODUCT_ENTITY_URL_KEY_STORE_ID_VALUE'' in /path/to/magento1point8alpha1.dev/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /path/to/magento1point8alpha1.dev/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /path/to/magento1point8alpha1.dev/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /path/to/magento1point8alpha1.dev/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /path/to/magento1point8alpha1.dev/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /path/to/magento1point8alpha1.dev/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#5 /path/to/magento1point8alpha1.dev/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#6 /path/to/magento1point8alpha1.dev/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#7 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Resource/Url.php(546): Zend_Db_Adapter_Abstract->insert('catalog_product...', Array)
#8 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(374): Mage_Catalog_Model_Resource_Url->saveProductAttribute(Object(Varien_Object), 'url_key')
#9 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(562): Mage_Catalog_Model_Url->_refreshProductRewrite(Object(Varien_Object), Object(Varien_Object))
#10 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(255): Mage_Catalog_Model_Url->refreshProductRewrites('1')
#11 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(248): Mage_Catalog_Model_Url->refreshRewrites('1')
#12 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Indexer/Url.php(257): Mage_Catalog_Model_Url->refreshRewrites()
#13 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Index/Model/Process.php(210): Mage_Catalog_Model_Indexer_Url->reindexAll()
#14 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#15 /path/to/magento1point8alpha1.dev/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
#16 /path/to/magento1point8alpha1.dev/shell/indexer.php(212): Mage_Shell_Compiler->run()
#17 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-sony-vaio-vgn-txn27n-b-11-1-notebook-pc' for key 'UNQ_CATALOG_PRODUCT_ENTITY_URL_KEY_STORE_ID_VALUE'' in /path/to/magento1point8alpha1.dev/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /path/to/magento1point8alpha1.dev/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /path/to/magento1point8alpha1.dev/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /path/to/magento1point8alpha1.dev/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /path/to/magento1point8alpha1.dev/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /path/to/magento1point8alpha1.dev/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /path/to/magento1point8alpha1.dev/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Resource/Url.php(546): Zend_Db_Adapter_Abstract->insert('catalog_product...', Array)
#7 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(374): Mage_Catalog_Model_Resource_Url->saveProductAttribute(Object(Varien_Object), 'url_key')
#8 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(562): Mage_Catalog_Model_Url->_refreshProductRewrite(Object(Varien_Object), Object(Varien_Object))
#9 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(255): Mage_Catalog_Model_Url->refreshProductRewrites('1')
#10 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Url.php(248): Mage_Catalog_Model_Url->refreshRewrites('1')
#11 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Catalog/Model/Indexer/Url.php(257): Mage_Catalog_Model_Url->refreshRewrites()
#12 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Index/Model/Process.php(210): Mage_Catalog_Model_Indexer_Url->reindexAll()
#13 /path/to/magento1point8alpha1.dev/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#14 /path/to/magento1point8alpha1.dev/shell/indexer.php(166): Mage_Index_Model_Process->reindexEverything()
#15 /path/to/magento1point8alpha1.dev/shell/indexer.php(212): Mage_Shell_Compiler->run()
#16 {main}

Failing working sample data, is there a known method to surgically fix this problem manually in the database?

Or is this a result of some alpha-ish bugs that'll be fixed in a future release? (Tangent: Where should the unwashed masses report bugs these days?)

6

I believe Vinai Kopp found a solution for this - https://gist.github.com/Vinai/5451584

Any site with duplicate url_keys will be affected. The 1.6.1 sample data is but one example. See the gist for a bit more background.

2

First reported here... http://www.magentocommerce.com/bug-tracking/issue?issue=14940

See the comments for the full debug with magento sample data and solution, and which product is affected exactly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.