|
Hi All,
We are getting the below error when re-indexing Product Prices after the upgrade from 1.5 to 1.7.0.2.
We have tried several methods of upgrading but currently have the following setup:
1. Fresh install of Magento 1.7.0.2
2. Imported old database
3. Ran upgrade script by going to home page
4. Tried to reindex
Currently my guess is that a module/extension we had installed previously has made some changes to the database which is now causing this issue when re-indexing - At this point I’m really unsure about how to troubleshoot further.
Weeks of troubleshooting have got us no where with this error so any help would be much appreciated!
Product Prices index process unknown error:
exception ‘PDOException’ with message ‘SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn’t match value count at row 1’ in /home/somedays/public_html/testinstall/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/somedays/public_html/testinstall/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/somedays/public_html/testinstall/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/somedays/public_html/testinstall/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/somedays/public_html/testinstall/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/somedays/public_html/testinstall/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO `ca...’, Array)
#5 /home/somedays/public_html/testinstall/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO `ca...’, Array)
#6 /home/somedays/public_html/testinstall/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(455): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO `ca...’)
#7 /home/somedays/public_html/testinstall/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(379): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareTierPriceIndex()
#8 /home/somedays/public_html/testinstall/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#9 /home/somedays/public_html/testinstall/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /home/somedays/public_html/testinstall/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#11 /home/somedays/public_html/testinstall/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#12 /home/somedays/public_html/testinstall/shell/indexer.php(198): Mage_Shell_Compiler->run()
#13 {main}
Next exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn’t match value count at row 1’ in /home/somedays/public_html/testinstall/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /home/somedays/public_html/testinstall/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/somedays/public_html/testinstall/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/somedays/public_html/testinstall/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/somedays/public_html/testinstall/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(’INSERT INTO `ca...’, Array)
#4 /home/somedays/public_html/testinstall/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO `ca...’, Array)
#5 /home/somedays/public_html/testinstall/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(455): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO `ca...’)
#6 /home/somedays/public_html/testinstall/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(379): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareTierPriceIndex()
#7 /home/somedays/public_html/testinstall/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#8 /home/somedays/public_html/testinstall/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 /home/somedays/public_html/testinstall/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#10 /home/somedays/public_html/testinstall/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#11 /home/somedays/public_html/testinstall/shell/indexer.php(198): Mage_Shell_Compiler->run()
#12 {main}
SOLUTION:
Enabled magento DB logging via:
lib/Varien/Db/Adapter/Pdo/Mysql.php . Down around line 86, you’ll see the following class variables:
protected $_debug = false;
protected $_logAllQueries = false;
protected $_logCallStack = false;
protected $_debugFile = ‘var/debug/sql.txt’;
Change all to true and then ran the reindex. Then checked the log file specified above.
The log file indicated which table in my database was causing the issue and I compared the table structure of this table with the same one here: http://www.magereverse.com/index/magento-database-diagram/version/1-7-0-2
Removed the column that shouldnt be there fixed the issue.
|