After successfully migrated from Magento 1.x to 2.x I am getting issues with Indexer, Check below screen.

(I need to Show products on frontend So, re-indexing is must)

Please see this error when try to do reindexing

Please Help Thanks in Advance.

有帮助吗?

解决方案

As stated in the comments, most probably you imported some tier prices for at least a product for a website that does not exist.

To fix this you have to identify the rows in the table catalog_product_entity_tier_price that have in the column website_id a value that is not present in the table store_website.

A rough query could be

SELECT 
    * 
FROM 
    catalog_product_entity_tier_price tier
WHERE 
    website_id NOT IN (
        SELECT website_id FROM store_website
    )

I'm sure this is not optimized but it should work.
To delete the rows if any just change in the query above SELECT * with DELETE.
This is not tested and I might be wrong so please backup your db first.

If there are rows and you delete them, try reindexing again.

许可以下: CC-BY-SA归因
scroll top