0

I have been dealing with this issue for a couple of days now, and just cant seem to pinpoint the problem, or more importantly an answer. I have tried the follow..

  • Clearing the cache
  • deleting var/locks
  • reindexing through ssh
  • truncating _flat tables
  • database repair tool

I am open to anything at this point... any help or a link in the right direction would help greatly. Thanks.

Product Prices index process unknown error:
exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list doe
s not match column list: 1136 Column count doesn't match value count at row 1
' in /home/blazerad/public_html/magento/lib/Zend/Db/Statement/Pdo.php:228

Stack trace:

#0 /home/blazerad/public_html/magento/lib/Zend/Db/Statement/Pdo.php(228): PDO
Statement->execute(Array)
#1 /home/blazerad/public_html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(1
10): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/blazerad/public_html/magento/lib/Zend/Db/Statement.php(300): Varien_
Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/blazerad/public_html/magento/lib/Zend/Db/Adapter/Abstract.php(479):
Zend_Db_Statement->execute(Array)
#4 /home/blazerad/public_html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(23
8): Zend_Db_Adapter_Abstract->query('INSERT INTO `sm...', Array)
#5 /home/blazerad/public_html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(419
): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sm...', Array)
#6 /home/blazerad/public_html/magento/app/code/core/Mage/Catalog/Model/Resour
ce/Product/Indexer/Price/Default.php(287): Varien_Db_Adapter_Pdo_Mysql->query
('INSERT INTO `sm...')
#7 /home/blazerad/public_html/magento/app/code/core/Mage/Downloadable/Model/R
esource/Indexer/Price.php(47): Mage_Catalog_Model_Resource_Product_Indexer_Pr
ice_Default->_prepareFinalPriceData()
#8 /home/blazerad/public_html/magento/app/code/core/Mage/Catalog/Model/Resour
ce/Product/Indexer/Price.php(385): Mage_Downloadable_Model_Resource_Indexer_P
rice->reindexAll()
#9 /home/blazerad/public_html/magento/app/code/core/Mage/Index/Model/Indexer/
Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindex
All()
#10 /home/blazerad/public_html/magento/app/code/core/Mage/Index/Model/Process
.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#11 /home/blazerad/public_html/magento/app/code/core/Mage/Index/Model/Process
.php(255): Mage_Index_Model_Process->reindexAll()
#12 /home/blazerad/public_html/magento/shell/indexer.php(158): Mage_Index_Mod
el_Process->reindexEverything()
#13 /home/blazerad/public_html/magento/shell/indexer.php(198): Mage_Shell_Com
piler->run()
#14 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[21S01]: I
nsert value list does not match column list: 1136 Column count doesn't match
value count at row 1' in /home/blazerad/public_html/magento/lib/Zend/Db/State
ment/Pdo.php:234

Stack trace:

#0 /home/blazerad/public_html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(1
10): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/blazerad/public_html/magento/lib/Zend/Db/Statement.php(300): Varien_
Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/blazerad/public_html/magento/lib/Zend/Db/Adapter/Abstract.php(479):
Zend_Db_Statement->execute(Array)
#3 /home/blazerad/public_html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(23
8): Zend_Db_Adapter_Abstract->query('INSERT INTO `sm...', Array)
#4 /home/blazerad/public_html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(419
): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sm...', Array)
#5 /home/blazerad/public_html/magento/app/code/core/Mage/Catalog/Model/Resour
ce/Product/Indexer/Price/Default.php(287): Varien_Db_Adapter_Pdo_Mysql->query
('INSERT INTO `sm...')
#6 /home/blazerad/public_html/magento/app/code/core/Mage/Downloadable/Model/R
esource/Indexer/Price.php(47): Mage_Catalog_Model_Resource_Product_Indexer_Pr
ice_Default->_prepareFinalPriceData()
#7 /home/blazerad/public_html/magento/app/code/core/Mage/Catalog/Model/Resour
ce/Product/Indexer/Price.php(385): Mage_Downloadable_Model_Resource_Indexer_P
rice->reindexAll()
#8 /home/blazerad/public_html/magento/app/code/core/Mage/Index/Model/Indexer/
Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindex
All()
#9 /home/blazerad/public_html/magento/app/code/core/Mage/Index/Model/Process.
php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /home/blazerad/public_html/magento/app/code/core/Mage/Index/Model/Process
.php(255): Mage_Index_Model_Process->reindexAll()
#11 /home/blazerad/public_html/magento/shell/indexer.php(158): Mage_Index_Mod
el_Process->reindexEverything()
#12 /home/blazerad/public_html/magento/shell/indexer.php(198): Mage_Shell_Com
piler->run()
#13 {main}

1 Answers1

0

You should to check a query and table structure

Open file app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php

And find line with

$query = $select->insertFromSelect($this->_getDefaultFinalPriceTable(), array(), false);

You may print variable $query and result of the function $this->_getDefaultFinalPriceTable(), you may do it when you call reindex from the console.

Aleksandr
  • 193
  • 1
  • 6
  • `$query = $select->insertFromSelect($this->_getDefaultFinalPriceTable(), array(), false); $write->query($query);` I see this line, but i am unsure what your suggesting i change it to – user3760917 Jul 02 '14 at 18:05
  • Add after this line next code `var_dump($query, $this->_getDefaultFinalPriceTable()); dd();` and run `shell/indexer.php` You will get sql query and table name after that you should check them – Aleksandr Jul 02 '14 at 18:24
  • Hi, you should add `var_dump($query, $this->_getDefaultFinalPriceTable()); dd();` before `$write->query($query);` – Aleksandr Jul 03 '14 at 08:14
  • Fatal error: Function name must be a string in /home/blazerad/public_html/magento/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php on line 287 – user3760917 Jul 03 '14 at 11:54
  • I got sql query and got field list from this query: `entity_id, customer_group_id, website_id, tax_class_id, orig_price, price, min_price, max_price, tier_price, base_tier, group_price, base_group_price`. Could you check table's structure for table 'catalog_product_index_price_final_idx'? – Aleksandr Jul 03 '14 at 12:48
  • How I understand you use custom module which changed table's structure and could change a behaviour of indexer because field `store_id` is absent by default – Aleksandr Jul 03 '14 at 14:41
  • www.blazerproducts.com/magento/this.jpg i think i found where im having the issue... now to try and fix it... – user3760917 Jul 03 '14 at 14:50