0

When I run the reindexing command got this error:

Fatal error: Uncaught Error: Cannot instantiate interface Magento\InventoryIndexer\Model\StockIndexTableNameResolverInterface in /home/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116 Stack trace: #0 /home/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Invento...', Array) #1 /home/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Invento...')
#2 /home/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Invento...')
#3 /home/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Invento...')
#4 /home/public_html/vendor/magento/framework/In in /home/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116

Got the same error when saving product.

3

I had the exact same issue when trying to reindex and after investigating, I realized that some of Magento's modules starting with "Magento_Inventory" were activated and some others were not.

When we upgraded our project to 2.3 we had to deactivate all of those modules so that our "normal" inventories would still work as expected, since we are not going to use the 2.3 multi inventories feature. Although, it seems that by some mistake a few of those modules were reactivated in our config.php file - leading to an interface being declared without any dependency injected.

I suggest that you check your config file to see if those modules are activated or not, as I believe they should be altogether activated or deactivated instead of having some and other not.

1

Run these commands

php bin/magento c:c
php bin/magento setup:di:compile
php -dmemory_limit=1G bin/magento setup:static-content:deploy -f
php bin/magento cache:clean

This should resolve your issue

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.