Steps to solve re-indexing errors in Magento Admin

Last modified by mage_zafar on Fri, May 6, 2011 02:35
Source|Old Revisions  

While re-indexing from the Magento Admin Panel sometimes we get errors like “An error occurred while saving the URL rewrite” or “cannot initialize indexer process” , etc

So method to solve the above problem:-

1.Go to the Magento root installation directory through FTP or Cpanel or etc and goto var/locks directory and delete all the files under it.

2. Go to the Magento database by login to phpMyAdmin or etc and run the below MySQL query

  2. DELETE cpop.* FROM catalog_product_option_price AS cpop
  3. INNER JOIN catalog_product_option AS cpo
  4. ON cpo.option_id = cpop.option_id
  5. WHERE
  6. cpo.type = 'checkbox' OR
  7. cpo.type = 'radio' OR
  8. cpo.type = 'drop_down';
  12. DELETE cpotp.* FROM catalog_product_option_type_price AS cpotp
  13. INNER JOIN catalog_product_option_type_value AS cpotv
  14. ON cpotv.option_type_id = cpotp.option_type_id
  15. INNER JOIN catalog_product_option AS cpo
  16. ON cpotv.option_id = cpo.option_id
  17. WHERE
  18. cpo.type <> 'checkbox' AND
  19. cpo.type <> 'radio' AND
  20. cpo.type <> 'drop_down';

Note :- It is advisable to take backup of database before running the above SQL query.

3.Login to Magento Admin panel & again re-index from Index management panel