5

How To Resolve Magento ReIndexing Errors In Magento 1.9.1 Store please find the below image

enter image description here

When I reindex product prices it is showing below error

There was a problem with reindexing process.
SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1, query was: INSERT INTO `catalog_product_index_price_final_idx` SELECT `inner`.`entity_id`, `inner`.`customer_group_id`, `inner`.`website_id`, `inner`.`tax_class_id`, `inner`.`orig_price`, `inner`.`price`, `inner`.`min_price`, MAX(inner.max_price) AS `max_price`, `inner`.`tier_price`, `inner`.`base_tier` FROM (SELECT e.entity_id AS `entity_id`, pi.customer_group_id AS `customer_group_id`, cw.website_id AS `website_id`, pi.tax_class_id AS `tax_class_id`, pi.price AS `orig_price`, pi.final_price AS `price`, pi.final_price AS `min_price`, pi.final_price AS `max_price`, pi.tier_price AS `tier_price`, pi.tier_price AS `base_tier` FROM `catalog_product_entity` AS `e` LEFT JOIN `catalog_product_super_link` AS `l` ON l.parent_id = e.entity_id INNER JOIN `catalog_product_entity` AS `ce` ON ce.entity_id = l.product_id INNER JOIN `catalog_product_index_price_idx` AS `pi` ON ce.entity_id = pi.entity_id INNER JOIN `core_website` AS `cw` ON pi.website_id = cw.website_id INNER JOIN `core_store_group` AS `csg` ON csg.website_id = cw.website_id AND cw.default_group_id = csg.group_id INNER JOIN `core_store` AS `cs` ON csg.default_store_id = cs.store_id AND cs.store_id != 0 CROSS JOIN `cataloginventory_stock` AS `cis` LEFT JOIN `cataloginventory_stock_item` AS `cisi` ON cisi.stock_id = cis.stock_id AND cisi.product_id = ce.entity_id LEFT JOIN `catalog_product_entity_int` AS `tad_status` ON tad_status.entity_id = ce.entity_id AND tad_status.attribute_id = 84 AND tad_status.store_id = 0 LEFT JOIN `catalog_product_entity_int` AS `tas_status` ON tas_status.entity_id = ce.entity_id AND tas_status.attribute_id = 84 AND tas_status.store_id = cs.store_id INNER JOIN `cataloginventory_stock_status` AS `ciss` ON ciss.product_id = e.entity_id AND ciss.website_id = cw.website_id WHERE (e.type_id='configurable') AND (ciss.stock_status = 1) ORDER BY IF(IF(cisi.use_config_manage_stock = 0 AND cisi.manage_stock = 0, 1, cisi.is_in_stock), 1, 0) DESC, pi.final_price ASC, pi.price ASC) AS `inner` GROUP BY `inner`.`entity_id`, `inner`.`customer_group_id`, `inner`.`website_id` ON DUPLICATE KEY UPDATE `tax_class_id` = VALUES(`tax_class_id`), `orig_price` = VALUES(`orig_price`), `price` = VALUES(`price`), `min_price` = VALUES(`min_price`), `max_price` = VALUES(`max_price`), `tier_price` = VALUES(`tier_price`), `base_tier` = VALUES(`base_tier`), `group_price` = VALUES(`group_price`), `base_group_price` = VALUES(`base_group_price`)`

How to rectify this issue?

  • did you tried emptying var/lock folder? – Shyam Krishna Sreekumar May 26 '15 at 5:17
  • lock folder is not there in my magneto var folder – Siva Kumar May 26 '15 at 5:19
  • 2
    Try from shell - php shell/indexer.php -reindexall – Adarsh Khatri May 26 '15 at 5:22
  • enable log and check.. – Shyam Krishna Sreekumar May 26 '15 at 5:25
  • as @adarsh khatri recommend, try to reindex using shell. – Deepak Mankotia May 26 '15 at 5:36
5

This is a problem with extension: Simple Configurable Products.

The indexer is trying to insert 10 values into table which have 12 columns.

This diff shows the fix

Older Magento versions didn't have products grouping and this is why SCP extension doesn't support two additional columns.

-1

To solve this problem Run this command

DROP TABLE IF EXISTS `catalog_product_index_price_final_idx`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `catalog_product_index_price_final_idx` (
`entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
`customer_group_id` smallint(5) unsigned NOT NULL COMMENT 'Customer Group ID',
`website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
`tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
`orig_price` decimal(12,4) DEFAULT NULL COMMENT 'Original Price',
`price` decimal(12,4) DEFAULT NULL COMMENT 'Price',
`min_price` decimal(12,4) DEFAULT NULL COMMENT 'Min Price',
`max_price` decimal(12,4) DEFAULT NULL COMMENT 'Max Price',
`tier_price` decimal(12,4) DEFAULT NULL COMMENT 'Tier Price',
`base_tier` decimal(12,4) DEFAULT NULL COMMENT 'Base Tier',
`group_price` decimal(12,4) DEFAULT NULL COMMENT 'Group price',
`base_group_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Group Price',
PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Catalog Product Price Indexer Final Index Table';
/*!40101 SET character_set_client = @saved_cs_client */;

in you database e.x. (phpmyadmin) this will drop the tabel and re create a new one. the problem caused be aditioanal column in you tables like store_id that you need to delete.

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.