Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7158329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:02:50+00:00 2026-05-28T13:02:50+00:00

I am having a problem with my Product Flat Index not reindexing, it only

  • 0

I am having a problem with my Product Flat Index not reindexing, it only stays on processing. I went in and ran the reindex through the shell with indexer.php.

I get a error that I do not understand a bit of, can someone help me?

Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`sprayfoa_store`.<result 2 when explaining filename '#sql-66c_ab044'>, CONSTRAINT `FK_CAT_PRD_FLAT_1_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity`)' in /home/sprayfoa/public_html/store/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/sprayfoa/public_html/store/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/sprayfoa/public_html/store/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/sprayfoa/public_html/store/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/sprayfoa/public_html/store/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/sprayfoa/public_html/store/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#5 /home/sprayfoa/public_html/store/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#6 /home/sprayfoa/public_html/store/lib/Varien/Db/Adapter/Pdo/Mysql.php(327): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#7 /home/sprayfoa/public_html/store/lib/Varien/Db/Adapter/Pdo/Mysql.php(2548): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
#8 /home/sprayfoa/public_html/store/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(806): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
#9 /home/sprayfoa/public_html/store/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(125): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(1)
#10 /home/sprayfoa/public_html/store/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(115): Mage_Catalog_Model_Resource_Product_Flat_Indexer->rebuild('1')
#11 /home/sprayfoa/public_html/store/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(73): Mage_Catalog_Model_Resource_Product_Flat_Indexer->rebuild(NULL)
#12 /home/sprayfoa/public_html/store/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(303): Mage_Catalog_Model_Product_Flat_Indexer->rebuild()
#13 /home/sprayfoa/public_html/store/app/code/core/Mage/Index/Model/Process.php(159): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#14 /home/sprayfoa/public_html/store/app/code/core/Mage/Index/Model/Process.php(187): Mage_Index_Model_Process->reindexAll()
#15 /home/sprayfoa/public_html/store/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#16 /home/sprayfoa/public_html/store/shell/indexer.php(198): Mage_Shell_Compiler->run()
#17 {main}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:02:50+00:00Added an answer on May 28, 2026 at 1:02 pm

    I found a way to fix my own problem.

    Using phpMyAdmin locate the catalog_product_flat_1 table in your Magento database. Then Empty (Truncate) that table, then using the indexer.php script in the shell directory in the root of your Magento install, reindex the Catalog Search Index through SSH.

    The command should look like this once you are in the ‘shell’ directory
    php indexer.php --reindex catalogsearch_fulltext

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
Having a strange problem with CJ's Product Catalog Search Service . Wondering if anyone
I'm having problem with FS controller page template. I had this Plone2 base product
I'm having a problem with an :has_many => :through association which references another :has_many
I'm having a problem with the inArray function not sure why. I'm passing a
I am having a problem with addAttributeToFilter() where it is not working as I
I'm having a problem with install conditions in maintenance mode that only happens in
We're having a compatibility problem between Mercurial and another synchronization product (MS Office Groove,
I'm having problem when running my Windows Forms program. In the program, I have
I'm having problem with Rails plugin attachment_fu . On every upload, I get validation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.