We upgraded to 2.3.1 and get on product list pages of several stores an error:
No linked stock found
Go to Stores -> Inventory -> Stocks (admin/inventory/stock/edit/stock_id/1/) and enable it for all websites, then hit save.
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.
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
I Had the same issue on a new (migrated) M2 Store This was the solution:
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
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 ;)
In our case, we didn't have a default stocks. So we went to Stores -> Inventory -> Stocks in the admin backend and created a new default stocks, named "default". saved, reindexed, cleaned cache and worked. Inventory Source was not required in the process.
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.