I have recently upgrade my instance from Magento 2.3.0 to 2.4.3 and products are not showing on the frontend. When I run php bin/magento indexer:reindex command I get this error:
Any help will be appreciated.
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_statuslegacy_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: php bin/magento module:enable --all
Compile DI php bin/magento setup:di:compile
now run below commands
php bin/magento indexer:reset
php bin/magento indexer:reindex