17

We upgraded to 2.3.1 and get on product list pages of several stores an error:

No linked stock found

6 Answers 6

29

Go to Stores -> Inventory -> Stocks (admin/inventory/stock/edit/stock_id/1/) and enable it for all websites, then hit save.

(See also https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Magento-update-to-2-3-compilation-errors/td-p/114524)

2
  • 1
    It's great that there is a workaround for this problem, however, it's not supposed to happen anyway, as there is a composer plugin which is supposed to disable MSI modules when upgrading. Can you please describe your upgrade flow? Did you enable the Inventory modules manually and did you run setup:upgrade if that is the case? This information would be helpful, as we might need to create a bug report for MSI in case it doesn't work as expected.
    – Eugene
    Jun 3, 2019 at 20:12
  • We probably did not follow this workflow. We updated in dev and then deployed the new composer.lock to production.
    – Alex
    Jun 3, 2019 at 21:00
16

Im using composer 1.9.1 on Magento 2.3.2 and I have this issue on domains other than the main domain on our multi-site. So for me, composer update was not the answer. But thanks for your suggestion :)

I fixed this error by disabling the MSI modules:

php bin/magento module:disable -f Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales Magento_InventoryCatalogAdminUi Magento_InventoryCatalogApi Magento_InventoryCatalogSearch Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventoryIndexer Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryReservations Magento_InventoryReservationsApi Magento_InventoryCache Magento_InventorySalesAdminUi Magento_InventorySalesApi Magento_InventorySalesFrontendUi Magento_InventoryShipping Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventorySourceSelectionApi Magento_InventoryShippingAdminUi Magento_InventoryDistanceBasedSourceSelectionAdminUi Magento_InventoryDistanceBasedSourceSelectionApi Magento_InventoryElasticsearch Magento_InventoryExportStockApi Magento_InventoryReservationCli Magento_InventoryExportStock Magento_CatalogInventoryGraphQl Magento_InventorySetupFixtureGenerator

php bin/magento setup:upgrade
0
6

I Had the same issue on a new (migrated) M2 Store This was the solution:

  • Go to Stores -> Inventory -> Sources, add new Sources
  • Go to Stores -> Inventory -> Stocks Add new Stocks and select all stores, and save Stocks.
1
  • 1
    This is the right answer if you are upgrading from 2.x.x ~> 2.3.x or higher, or if you are RE-ENABLING the MSI's modules. Mar 15, 2021 at 13:52
4

its issue of MSI modules just disabled these modules manually or run this command on your SSH terminal php72 bin/magento module:disable Magento_InventoryRequisitionList Magento_InventoryDistanceBasedSourceSelection Magento_InventoryGraphQl Magento_InventorySalesApi Magento_InventoryAdvancedCheckout Magento_Inventory Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales Magento_InventoryCatalogAdminUi Magento_InventoryCatalogApi Magento_InventoryCatalogSearch Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventoryIndexer Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryReservations Magento_InventoryReservationsApi Magento_InventoryCache Magento_InventorySalesAdminUi Magento_InventorySalesApi Magento_InventorySalesFrontendUi Magento_InventoryShipping Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventorySourceSelectionApi Magento_InventoryShippingAdminUi Magento_InventoryDistanceBasedSourceSelectionAdminUi Magento_InventoryDistanceBasedSourceSelectionApi Magento_InventoryElasticsearch Magento_InventoryExportStockApi Magento_InventoryReservationCli Magento_InventoryExportStock Magento_CatalogInventoryGraphQl Magento_InventorySetupFixtureGenerator --clear-static-content

php72 bin/magento setup:di:compile it will solve your issue

1

I think this issue appears if you're using an older version of composer.

I had the same issue in my developer machine over and over again when testing our update from Magento 2.2.4 to 2.3.1 using composer 1.2.2 (which is the standard version in the Debian 9 Repo).

I also tested it in a Ubuntu 16.04 developer machine with composer 1.5.2 with no issues.

Then I removed composer version 1.2.2 from my debian 9 system and installed the latest version 1.8.6 and the issue disappeared.

Would be nice if someone could confirm my theory ;)

1
  • this is not the case, happening with composer 1.9
    – John
    Feb 17, 2020 at 9:30
0

possible the issue also happens with data migration, using the magento provided data migration tool.

I have a clean installed 2.3.2 (using composer) and after a successful migration of all data (multi-store), I could not save due to same error.

The provided solution also fixed the problem, as only the default store was listed in the Default stock setup.

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.