Skip to main content
updated answer
Source Link
Gohil Rajesh
  • 3.1k
  • 1
  • 14
  • 25

-> if error in indexing after upgrade then run below sql query in phpmyadmin

CREATE
SQL SECURITY INVOKER
VIEW `inventory_stock_1`
AS
SELECT
DISTINCT
legacy_stock_status.product_id,
legacy_stock_status.website_id,
legacy_stock_status.stock_id,
legacy_stock_status.qty quantity,
legacy_stock_status.stock_status is_salable,
product.sku
FROM `cataloginventory_stock_status` `legacy_stock_status`
INNER JOIN `catalog_product_entity` product
ON legacy_stock_status.product_id = product.entity_id;

and run below commands

  • Clear var/generation
  • Clear var/cache
  • Enable Magento modules: bin/magento module:enable --all
  • Compile DI bin/magento setup:di:compile

hope this helps you:)

-> if error in indexing after upgrade then run below sql query in phpmyadmin

CREATE
SQL SECURITY INVOKER
VIEW `inventory_stock_1`
AS
SELECT
DISTINCT
legacy_stock_status.product_id,
legacy_stock_status.website_id,
legacy_stock_status.stock_id,
legacy_stock_status.qty quantity,
legacy_stock_status.stock_status is_salable,
product.sku
FROM `cataloginventory_stock_status` `legacy_stock_status`
INNER JOIN `catalog_product_entity` product
ON legacy_stock_status.product_id = product.entity_id;

hope this helps you:)

-> if error in indexing after upgrade then run below sql query in phpmyadmin

CREATE
SQL SECURITY INVOKER
VIEW `inventory_stock_1`
AS
SELECT
DISTINCT
legacy_stock_status.product_id,
legacy_stock_status.website_id,
legacy_stock_status.stock_id,
legacy_stock_status.qty quantity,
legacy_stock_status.stock_status is_salable,
product.sku
FROM `cataloginventory_stock_status` `legacy_stock_status`
INNER JOIN `catalog_product_entity` product
ON legacy_stock_status.product_id = product.entity_id;

and run below commands

  • Clear var/generation
  • Clear var/cache
  • Enable Magento modules: bin/magento module:enable --all
  • Compile DI bin/magento setup:di:compile

hope this helps you:)

Source Link
Gohil Rajesh
  • 3.1k
  • 1
  • 14
  • 25

-> if error in indexing after upgrade then run below sql query in phpmyadmin

CREATE
SQL SECURITY INVOKER
VIEW `inventory_stock_1`
AS
SELECT
DISTINCT
legacy_stock_status.product_id,
legacy_stock_status.website_id,
legacy_stock_status.stock_id,
legacy_stock_status.qty quantity,
legacy_stock_status.stock_status is_salable,
product.sku
FROM `cataloginventory_stock_status` `legacy_stock_status`
INNER JOIN `catalog_product_entity` product
ON legacy_stock_status.product_id = product.entity_id;

hope this helps you:)