0

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.

  • Most probably you imported some tier prices for at least a product for a website that does not exist – Marius Apr 19 '18 at 8:17
  • Ok then what should i do to remove this error? – Gagandeep Singh Apr 19 '18 at 8:23
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.