Can't re-index new products after upgrading to version 1.6

后端 未结 3 371
借酒劲吻你
借酒劲吻你 2021-01-07 10:09

I\'ve upgraded my site from version 1.4.0.1 to version 1.6. I\'ve deleted all the products from the website and did \"reindex all\" that was finished successfully. When I tr

相关标签:
3条回答
  • 2021-01-07 10:41

    If you are doing this on a live site, you probably need to do the reindex process from the command line with Apache turned off.

    http://overlycaffeinated.com/2011/02/when-reindexing-in-magento-fails-use-the-command-line/

    This explains how to do this.

    0 讨论(0)
  • 2021-01-07 10:49

    I used following queries to clean catalog tables;

    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_entity_media_gallery` WHERE entity_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)
    

    After this i was able to reindex from admin panel.

    0 讨论(0)
  • 2021-01-07 10:58

    This only removes rogue data that shouldn't be there.

    I've expanded the above as it may save some hours of digging:

    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);
    #originals with formatting fixed:
    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);
    
    0 讨论(0)
提交回复
热议问题