^ Scroll to Top
Contact us | Login

Magento – There was a problem with reindexing process.

Just a quick blog about this one as it wasted about an hour of my time and wanted to help others (and remind myself for future reference)

I had a customer who had this error when trying to re-index his Category Products “ There was a problem with reindexing process.”

After a bit of digging the solution was to:

1. Backup the SQL table “catalog_category_product_index” with “Disable foreign key checks” ticked.
2. Drop the table.
3. Remove the constraints at the bottom of the backup file, except “SET FOREIGN_KEY_CHECKS=1;”
so on my file it was this
“ALTER TABLE `catalog_category_product_index`

ADD CONSTRAINT `FK_CATALOG_CATEGORY_PROD_IDX_CATEGORY_ENTITY` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `FK_CATALOG_CATEGORY_PROD_IDX_PROD_ENTITY` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE;”
4. Save and Import your backup file, or runt the sql directly.
5. You should then be able to run the re-index from the magento backend.
6. If 5 did not work(you might have thousands of products) SSH to your install and go to /shell/ and run this command.
“php indexer.php –reindex catalog_category_product”
if you want to re-index all run this “php indexer.php reindexall”
That’s it, i hope this helps some one…
Stiofan

5 Responses to “Magento – There was a problem with reindexing process.”

  1. Chris Plotts says:

    Dude, you are a GOD! Thanx for posting this fix I have spent months off and on with this issue.

  2. Yormann says:

    Didn’t work for me. My backup file didn’t show the constraints at the bottom. I found just this:

    SET FOREIGN_KEY_CHECKS=1;

    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

    Thanks

  3. Yormann says:

    After struggling for hours I finally found a solution. In fact, It’s a very simple solution:

    Open phpMyAdmin and trunacte (empty) the table catalog_product_flat_1

    That’s it. After that I was able to index all data and, until now, everything else works perfectly.

  4. AJ Fast says:

    @Stiofan

    Chris is right you are a GOD. Suffering for many days without finding a sollution on the internet.
    Yormann’s solution, to truncate the catalog_product_flat_1 table was not working for me.

    Thank you very very much!!!

    AJ

  5. Stiofan says:

    Glad you got it in the end :)

Leave a Reply