Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error rebulding flat catalog product
 
Frederik Bové
Member
 
Total Posts:  58
Joined:  2008-08-26
 

I get this error while rebuilding the flat catalog product index

exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘’ for key 2’ in /web/uraniadiensten/astroshopurania.be/www/lib/Zend/Db/Statement/Pdo.php:238 Stack trace: #0 /web/uraniadiensten/astroshopurania.be/www/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array) #1 /web/uraniadiensten/astroshopurania.be/www/lib/Zend/Db/Adapter/Abstract.php(457): Zend_Db_Statement->execute(Array) #2 /web/uraniadiensten/astroshopurania.be/www/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query(’UPDATE `catalog...’, Array) #3 /web/uraniadiensten/astroshopurania.be/www/lib/Varien/Db/Adapter/Pdo/Mysql.php(259): Zend_Db_Adapter_Pdo_Abstract->query(’UPDATE `catalog...’, Array) #4 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(637): Varien_Db_Adapter_Pdo_Mysql->query(’UPDATE `catalog...’) #5 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(655): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->updateAttribute(Object(Mage_Catalog_Model_Resource_Eav_Attribute), ‘1’, NULL) #6 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(118): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->updateEavAttributes(’1’) #7 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(108): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild(’1’) #8 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Adminhtml/controllers/System/CacheController.php(235): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild() #9 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Core/Controller/Varien/Action.php(367): Mage_Adminhtml_System_CacheController->saveAction() #10 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(247): Mage_Core_Controller_Varien_Action->dispatch(’save’) #11 /web/uraniadiensten/astroshopurania.be/www/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #12 /web/uraniadiensten/astroshopurania.be/www/app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch() #13 /web/uraniadiensten/astroshopurania.be/www/index.php(52): Mage::run() #14 {main}

anyone a idee

 
Magento Community Magento Community
Magento Community
Magento Community
 
jun266
Sr. Member
 
Total Posts:  104
Joined:  2008-07-16
 

I got this one:

exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘is_filterable_in_search’ in ‘where clause’’ in /home/getcom/domains/get168.com/public_html/lib/Zend/Db/Statement/Pdo.php:238 Stack trace: #0 /home/getcom/domains/get168.com/public_html/lib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array) #1 /home/getcom/domains/get168.com/public_html/lib/Zend/Db/Adapter/Abstract.php(457): Zend_Db_Statement->execute(Array) #2 /home/getcom/domains/get168.com/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query(’SELECT `eav_att...’, Array) #3 /home/getcom/domains/get168.com/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(259): Zend_Db_Adapter_Pdo_Abstract->query(’SELECT `eav_att...’, Array) #4 /home/getcom/domains/get168.com/public_html/lib/Zend/Db/Adapter/Abstract.php(744): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array) #5 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(168): Zend_Db_Adapter_Abstract->fetchPairs(Object(Varien_Db_Select)) #6 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(206): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->getAttributeCodes(false) #7 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(303): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->getAttributes() #8 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(379): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->getFlatColumns() #9 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(115): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->prepareFlatTable(’18’) #10 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(108): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild(’18’) #11 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Adminhtml/controllers/System/CacheController.php(235): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild() #12 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(367): Mage_Adminhtml_System_CacheController->saveAction() #13 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(247): Mage_Core_Controller_Varien_Action->dispatch(’save’) #14 /home/getcom/domains/get168.com/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #15 /home/getcom/domains/get168.com/public_html/app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch() #16 /home/getcom/domains/get168.com/public_html/index.php(52): Mage::run() #17 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
vmajor
Jr. Member
 
Total Posts:  12
Joined:  2009-02-08
 

I also got the

SQLSTATE[42S22]Column not found1054 Unknown column 'used_in_product_listing' in 'where clause'
error.

Any advice?

V.

EDIT: never mind. I fixed my error doing this:

Admin --> System --> Cache Management --> All Cache --> Refresh

V.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jarman22
Jr. Member
 
Total Posts:  5
Joined:  2009-03-19
 

Superb. I was getting exactly the same until I did a refresh. Worked like a dream!  cheese

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sheri
Jr. Member
 
Total Posts:  26
Joined:  2008-12-21
Tennessee
 

I’m getting this error and refreshing did not work. I am not a developer and need step by step instructions on how to fix it manually.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lee.collings
Jr. Member
 
Total Posts:  19
Joined:  2009-05-21
 

The Cache refresh isn’t working for me.
I’ve read somewhere that in the step from 1.2 to 1.3 some attribute tables were re-named, and this could be a case of Magento looking for the old name, is this the case?

Anyone have any other fixes for this apart from refreshing the cache?

 
Magento Community Magento Community
Magento Community
Magento Community
 
funk
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-10-29
 

I had the same problem (SQLSTATE[23000]: Integrity constraint violation: 1062) after rebuilding flat catalog and solved it by deleting all rows in table core_flag in the database.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wsj3
Guru
 
Avatar
Total Posts:  521
Joined:  2008-07-13
Portland, OR
 

If I delete all rows in table core_flag in the database is that going to potentially break anything? Can someone confirm that solution worked for them?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top