0

Last day I upgraded my Magento site from 1.5 to 1.9.2.3. But after that Re-indexing is not working. On Re-indexing it throws error:

Cannot initialize the indexer process.

I had truncated catalog_product_index_price tables and executed repair query for my db. But no use.

Please suggest me a solution for this.

4
  • Are your permissions set right? Check permissions on var/locks and also empty the directory.
    – Akif
    Mar 2 '16 at 11:35
  • Its drwxr-xr-x. But I got a mysql error like 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, query was: INSERT INTO catalog_product_index_price_final_idx` ...
    – dhi_m
    Mar 2 '16 at 11:54
  • something was missed in your upgrade. it shows columns for insert into are different for column name and vaules Mar 2 '16 at 12:07
  • Yes. I think so. I had compared my working db with fresh 1.9.2.3 db and executed some ALTER queries. But still the issue exists. How can I solve this ?
    – dhi_m
    Mar 2 '16 at 12:17
0

Run this query on your phpmyadmin. It will remove junk id which is not required. Then reindex again.

DELETE FROM 'catalog_product_entity_datetime' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_decimal' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_gallery' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_group_price' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_int' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_media_gallery' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_text' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_tier_price' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_product_entity_varchar' WHERE entity_id NOT IN (SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_category_product' WHERE product_id NOT IN(SELECT entity_id FROM 'catalog_product_entity');
DELETE FROM 'catalog_category_product' WHERE category_id NOT IN(SELECT entity_id FROM catalog_category_entity); 
DELETE FROM 'catalog_product_website' WHERE product_id NOT IN(SELECT entity_id FROM 'catalog_product_entity'); 
DELETE FROM 'catalog_product_index_eav_idx' WHERE entity_id NOT IN(SELECT entity_id FROM 'catalog_product_entity'); 
DELETE FROM 'catalog_product_index_eav' WHERE entity_id NOT IN(SELECT entity_id FROM 'catalog_product_entity'); 
DELETE FROM 'catalog_product_link' WHERE product_id NOT IN(SELECT entity_id FROM 'catalog_product_entity'); 
DELETE FROM 'catalog_product_relation' WHERE parent_id NOT IN(SELECT entity_id FROM 'catalog_product_entity');
8
  • Tried this but issue still exists.
    – dhi_m
    Mar 3 '16 at 4:59
  • Delete all lock files under var/locks
    – Asish Hira
    Mar 3 '16 at 7:10
  • My var/locks folder is empty :(
    – dhi_m
    Mar 3 '16 at 7:16
  • then check the permission of that folder. May be magento not able to create locks folder for lack of permission
    – Asish Hira
    Mar 3 '16 at 7:18
  • Its drwxr-xr-x. But except Product Prices re-indexing all others are working. So will it be a permission problem?
    – dhi_m
    Mar 3 '16 at 7:29

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.