Magento Forum

   
Problem with Reindexing Process for Tag Aggregation Data only! 
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Hi..
Client website was running on 1.4.x .

We recently upgraded it to 1.6.1 and all good, except one issue.

On Index Management, all the indexes are upto date, except the Tag Aggregation Data .

It gets stuck with an error , “Cannot initialize the indexer process.”

Also if I goto Featured Products page,

and try to select and save some products as featured, it shows an error on top :

SQLSTATE[23000]Integrity constraint violation1452 Cannot add or update a child rowa foreign key constraint fails (`devnov2`.`tag_summary`, CONSTRAINT `FK_TAG_SUMMARY_TAG_ID_TAG_TAG_IDFOREIGN KEY (`tag_id`) REFERENCES `tag` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE)

Looks like, there is a problem with the tags tables.

How to fix this ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

On another client site, he also got indexing issues, but for other 3 items.

[I tried reindexing from SSH , so know the errors. And I have posted below the exact errors, while magento is trying to reindex my data. ]

Product Prices - Index product prices

exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mageclub_jay/catalog_product_index_tier_price`, CONSTRAINT `FK_CAT_PRD_IDX_TIER_PRICE_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`))' in /home/mageclub/public_html/demolink.biz/jay/lib/Zend/Db/Statement/Pdo.php:228

Product Flat Data - Reorganize EAV product structure to flat structure

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mageclub_jay/catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON )' in /home/mageclub/public_html/demolink.biz/jay/lib/Zend/Db/Statement/Pdo.php:234

Category Products - Indexed category/products association

Category Products 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 (`mageclub_jay/catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON )' in /home/mageclub/public_html/demolink.biz/jay/lib/Zend/Db/Statement/Pdo.php:228

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Okay..
I fixed the issues by running database repair tool.

But only, Product Flat Data - Reorganize EAV product structure to flat structure is still stuck!

What can be the issue ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tetsuo_
Jr. Member
 
Total Posts:  8
Joined:  2009-09-22
 
soam - 22 November 2011 07:59 PM

On Index Management, all the indexes are upto date, except the Tag Aggregation Data .

It gets stuck with an error , “Cannot initialize the indexer process.”

Same issue here.  “Cannot initialize the indexer process.” when I attempt it to re-index. I also can’t add products to my cart because of this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jinful
Jr. Member
 
Total Posts:  1
Joined:  2010-07-21
 

My site experience the same issue, who can help me or tell me how to solve the problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
wien173
Jr. Member
 
Total Posts:  8
Joined:  2008-07-26
tokyo
 

Fixed Tag Aggregation Data Reindexing Problem.
In my case, fixed by deleteing the table data in tag_relation and tag_summary tables.
Though, you should add the products related with tag name again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
greenmusk
Jr. Member
 
Total Posts:  2
Joined:  2012-10-19
 

There are tag_ids in the summary and relation tables but not in the referenced table; seems like orphaned ids.

SELECT FROM tag_summary where tag_id not in (select tag_id from tag);
SELECT FROM tag_relation where tag_id not in (select tag_id from tag);

Both of the above queries should return 0 rows. If either or both return some results, you need to remove the orphaned rows:

Remove them safely:

DELETE FROM tag_summary where tag_id not in (select tag_id from tag);
DELETE FROM tag_relation where tag_id not in (select tag_id from tag);

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top