Magento 2.2.6 Unable to save stock item error





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















We are preparing to go live with a mage 2 store but after clearing all development product data we are no longer able to save products from admin.



The error "Unable to save stock item" is shown every time we try to save a product. All other content editors work as they should.



System.log shows the following error after attempting to save:



[2019-04-24 01:35:26] main.CRITICAL: Exception message: Unable to save Stock Item
Trace: #0 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Model/StockRegistry.php(180): MagentoCatalogInventoryModelStockStockItemRepository->save(Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
#1 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Observer/SaveInventoryDataObserver.php(110): MagentoCatalogInventoryModelStockRegistry->updateStockItemBySku('Test123', Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
#2 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoCatalogInventoryObserverSaveInventoryDataObserver->execute(Object(MagentoFrameworkEventObserver))
#3 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCatalogInventoryObserverSaveInventoryDataObserver), Object(MagentoFrameworkEventObserver))
#4 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
#5 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('catalog_product...', Array)
#6 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(818): MagentoFrameworkEventManagerProxy->dispatch('catalog_product...', Array)
#7 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/Product.php(948): MagentoFrameworkModelAbstractModel->afterSave()
#8 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(31): MagentoCatalogModelProduct->afterSave()
#9 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoFrameworkEntityManagerObserverAfterEntitySave->execute(Object(MagentoFrameworkEventObserver))
#10 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoFrameworkEntityManagerObserverAfterEntitySave), Object(MagentoFrameworkEventObserver))
#11 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
#12 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('magento_catalog...', Array)
#13 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EventManager.php(52): MagentoFrameworkEventManagerProxy->dispatch('magento_catalog...', Array)
#14 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Operation/Create.php(123): MagentoFrameworkEntityManagerEventManager->dispatchEntityEvent('Magento\Catalog...', 'save_after', Array)
#15 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EntityManager.php(96): MagentoFrameworkEntityManagerOperationCreate->execute(Object(MagentoCatalogModelProductInterceptor), Array)
#16 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/ResourceModel/Product.php(655): MagentoFrameworkEntityManagerEntityManager->save(Object(MagentoCatalogModelProductInterceptor))
#17 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoCatalogModelResourceModelProduct->save(Object(MagentoCatalogModelProductInterceptor))
#18 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogModelResourceModelProductInterceptor->___callParent('save', Array)
#19 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(51): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#20 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(24): MagentoCatalogSearchModelIndexerFulltextPluginProduct->addCommitCallback(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
#21 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoCatalogSearchModelIndexerFulltextPluginProduct->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
#22 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Cache/FlushCacheByTags.php(68): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#23 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoFrameworkAppCacheFlushCacheByTags->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
#24 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
#25 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(39): MagentoCatalogModelResourceModelProductInterceptor->___callPlugins('save', Array, Array)
#26 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(647): MagentoCatalogModelResourceModelProductInterceptor->save(Object(MagentoCatalogModelProductInterceptor))
#27 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(111): MagentoFrameworkModelAbstractModel->save()
#28 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Action/Action.php(107): MagentoCatalogControllerAdminhtmlProductSave->execute()
#29 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/AbstractAction.php(235): MagentoFrameworkAppActionAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
#30 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoBackendAppAbstractAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
#31 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callParent('dispatch', Array)
#32 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
#33 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoCatalogControllerAdminhtmlProductSaveInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
#34 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
#35 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(26): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callPlugins('dispatch', Array, NULL)
#36 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/FrontController.php(55): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#37 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
#38 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
#39 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
#40 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
#41 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
#42 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttp->launch()
#43 /var/www/html/staging.testsite.com.au/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#44 {main}


Any advice would be much appreciated. Thanks









share







New contributor




Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    We are preparing to go live with a mage 2 store but after clearing all development product data we are no longer able to save products from admin.



    The error "Unable to save stock item" is shown every time we try to save a product. All other content editors work as they should.



    System.log shows the following error after attempting to save:



    [2019-04-24 01:35:26] main.CRITICAL: Exception message: Unable to save Stock Item
    Trace: #0 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Model/StockRegistry.php(180): MagentoCatalogInventoryModelStockStockItemRepository->save(Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
    #1 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Observer/SaveInventoryDataObserver.php(110): MagentoCatalogInventoryModelStockRegistry->updateStockItemBySku('Test123', Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
    #2 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoCatalogInventoryObserverSaveInventoryDataObserver->execute(Object(MagentoFrameworkEventObserver))
    #3 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCatalogInventoryObserverSaveInventoryDataObserver), Object(MagentoFrameworkEventObserver))
    #4 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
    #5 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('catalog_product...', Array)
    #6 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(818): MagentoFrameworkEventManagerProxy->dispatch('catalog_product...', Array)
    #7 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/Product.php(948): MagentoFrameworkModelAbstractModel->afterSave()
    #8 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(31): MagentoCatalogModelProduct->afterSave()
    #9 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoFrameworkEntityManagerObserverAfterEntitySave->execute(Object(MagentoFrameworkEventObserver))
    #10 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoFrameworkEntityManagerObserverAfterEntitySave), Object(MagentoFrameworkEventObserver))
    #11 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
    #12 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('magento_catalog...', Array)
    #13 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EventManager.php(52): MagentoFrameworkEventManagerProxy->dispatch('magento_catalog...', Array)
    #14 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Operation/Create.php(123): MagentoFrameworkEntityManagerEventManager->dispatchEntityEvent('Magento\Catalog...', 'save_after', Array)
    #15 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EntityManager.php(96): MagentoFrameworkEntityManagerOperationCreate->execute(Object(MagentoCatalogModelProductInterceptor), Array)
    #16 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/ResourceModel/Product.php(655): MagentoFrameworkEntityManagerEntityManager->save(Object(MagentoCatalogModelProductInterceptor))
    #17 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoCatalogModelResourceModelProduct->save(Object(MagentoCatalogModelProductInterceptor))
    #18 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogModelResourceModelProductInterceptor->___callParent('save', Array)
    #19 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(51): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
    #20 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(24): MagentoCatalogSearchModelIndexerFulltextPluginProduct->addCommitCallback(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
    #21 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoCatalogSearchModelIndexerFulltextPluginProduct->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
    #22 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Cache/FlushCacheByTags.php(68): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
    #23 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoFrameworkAppCacheFlushCacheByTags->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
    #24 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
    #25 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(39): MagentoCatalogModelResourceModelProductInterceptor->___callPlugins('save', Array, Array)
    #26 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(647): MagentoCatalogModelResourceModelProductInterceptor->save(Object(MagentoCatalogModelProductInterceptor))
    #27 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(111): MagentoFrameworkModelAbstractModel->save()
    #28 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Action/Action.php(107): MagentoCatalogControllerAdminhtmlProductSave->execute()
    #29 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/AbstractAction.php(235): MagentoFrameworkAppActionAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
    #30 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoBackendAppAbstractAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
    #31 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callParent('dispatch', Array)
    #32 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
    #33 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoCatalogControllerAdminhtmlProductSaveInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
    #34 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
    #35 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(26): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callPlugins('dispatch', Array, NULL)
    #36 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/FrontController.php(55): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
    #37 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
    #38 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
    #39 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
    #40 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
    #41 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
    #42 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttp->launch()
    #43 /var/www/html/staging.testsite.com.au/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
    #44 {main}


    Any advice would be much appreciated. Thanks









    share







    New contributor




    Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      We are preparing to go live with a mage 2 store but after clearing all development product data we are no longer able to save products from admin.



      The error "Unable to save stock item" is shown every time we try to save a product. All other content editors work as they should.



      System.log shows the following error after attempting to save:



      [2019-04-24 01:35:26] main.CRITICAL: Exception message: Unable to save Stock Item
      Trace: #0 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Model/StockRegistry.php(180): MagentoCatalogInventoryModelStockStockItemRepository->save(Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
      #1 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Observer/SaveInventoryDataObserver.php(110): MagentoCatalogInventoryModelStockRegistry->updateStockItemBySku('Test123', Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
      #2 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoCatalogInventoryObserverSaveInventoryDataObserver->execute(Object(MagentoFrameworkEventObserver))
      #3 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCatalogInventoryObserverSaveInventoryDataObserver), Object(MagentoFrameworkEventObserver))
      #4 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
      #5 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('catalog_product...', Array)
      #6 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(818): MagentoFrameworkEventManagerProxy->dispatch('catalog_product...', Array)
      #7 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/Product.php(948): MagentoFrameworkModelAbstractModel->afterSave()
      #8 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(31): MagentoCatalogModelProduct->afterSave()
      #9 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoFrameworkEntityManagerObserverAfterEntitySave->execute(Object(MagentoFrameworkEventObserver))
      #10 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoFrameworkEntityManagerObserverAfterEntitySave), Object(MagentoFrameworkEventObserver))
      #11 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
      #12 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('magento_catalog...', Array)
      #13 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EventManager.php(52): MagentoFrameworkEventManagerProxy->dispatch('magento_catalog...', Array)
      #14 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Operation/Create.php(123): MagentoFrameworkEntityManagerEventManager->dispatchEntityEvent('Magento\Catalog...', 'save_after', Array)
      #15 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EntityManager.php(96): MagentoFrameworkEntityManagerOperationCreate->execute(Object(MagentoCatalogModelProductInterceptor), Array)
      #16 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/ResourceModel/Product.php(655): MagentoFrameworkEntityManagerEntityManager->save(Object(MagentoCatalogModelProductInterceptor))
      #17 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoCatalogModelResourceModelProduct->save(Object(MagentoCatalogModelProductInterceptor))
      #18 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogModelResourceModelProductInterceptor->___callParent('save', Array)
      #19 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(51): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
      #20 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(24): MagentoCatalogSearchModelIndexerFulltextPluginProduct->addCommitCallback(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
      #21 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoCatalogSearchModelIndexerFulltextPluginProduct->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
      #22 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Cache/FlushCacheByTags.php(68): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
      #23 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoFrameworkAppCacheFlushCacheByTags->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
      #24 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
      #25 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(39): MagentoCatalogModelResourceModelProductInterceptor->___callPlugins('save', Array, Array)
      #26 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(647): MagentoCatalogModelResourceModelProductInterceptor->save(Object(MagentoCatalogModelProductInterceptor))
      #27 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(111): MagentoFrameworkModelAbstractModel->save()
      #28 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Action/Action.php(107): MagentoCatalogControllerAdminhtmlProductSave->execute()
      #29 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/AbstractAction.php(235): MagentoFrameworkAppActionAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #30 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoBackendAppAbstractAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #31 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callParent('dispatch', Array)
      #32 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
      #33 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoCatalogControllerAdminhtmlProductSaveInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
      #34 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
      #35 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(26): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callPlugins('dispatch', Array, NULL)
      #36 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/FrontController.php(55): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #37 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #38 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
      #39 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
      #40 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
      #41 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #42 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttp->launch()
      #43 /var/www/html/staging.testsite.com.au/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
      #44 {main}


      Any advice would be much appreciated. Thanks









      share







      New contributor




      Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      We are preparing to go live with a mage 2 store but after clearing all development product data we are no longer able to save products from admin.



      The error "Unable to save stock item" is shown every time we try to save a product. All other content editors work as they should.



      System.log shows the following error after attempting to save:



      [2019-04-24 01:35:26] main.CRITICAL: Exception message: Unable to save Stock Item
      Trace: #0 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Model/StockRegistry.php(180): MagentoCatalogInventoryModelStockStockItemRepository->save(Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
      #1 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-inventory/Observer/SaveInventoryDataObserver.php(110): MagentoCatalogInventoryModelStockRegistry->updateStockItemBySku('Test123', Object(MagentoCatalogInventoryModelAdminhtmlStockItem))
      #2 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoCatalogInventoryObserverSaveInventoryDataObserver->execute(Object(MagentoFrameworkEventObserver))
      #3 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCatalogInventoryObserverSaveInventoryDataObserver), Object(MagentoFrameworkEventObserver))
      #4 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
      #5 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('catalog_product...', Array)
      #6 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(818): MagentoFrameworkEventManagerProxy->dispatch('catalog_product...', Array)
      #7 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/Product.php(948): MagentoFrameworkModelAbstractModel->afterSave()
      #8 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(31): MagentoCatalogModelProduct->afterSave()
      #9 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoFrameworkEntityManagerObserverAfterEntitySave->execute(Object(MagentoFrameworkEventObserver))
      #10 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoFrameworkEntityManagerObserverAfterEntitySave), Object(MagentoFrameworkEventObserver))
      #11 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Event/Manager.php(66): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver))
      #12 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch('magento_catalog...', Array)
      #13 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EventManager.php(52): MagentoFrameworkEventManagerProxy->dispatch('magento_catalog...', Array)
      #14 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/Operation/Create.php(123): MagentoFrameworkEntityManagerEventManager->dispatchEntityEvent('Magento\Catalog...', 'save_after', Array)
      #15 /var/www/html/staging.testsite.com.au/vendor/magento/framework/EntityManager/EntityManager.php(96): MagentoFrameworkEntityManagerOperationCreate->execute(Object(MagentoCatalogModelProductInterceptor), Array)
      #16 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Model/ResourceModel/Product.php(655): MagentoFrameworkEntityManagerEntityManager->save(Object(MagentoCatalogModelProductInterceptor))
      #17 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoCatalogModelResourceModelProduct->save(Object(MagentoCatalogModelProductInterceptor))
      #18 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogModelResourceModelProductInterceptor->___callParent('save', Array)
      #19 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(51): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
      #20 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(24): MagentoCatalogSearchModelIndexerFulltextPluginProduct->addCommitCallback(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
      #21 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoCatalogSearchModelIndexerFulltextPluginProduct->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
      #22 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Cache/FlushCacheByTags.php(68): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
      #23 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoFrameworkAppCacheFlushCacheByTags->aroundSave(Object(MagentoCatalogModelResourceModelProductInterceptor), Object(Closure), Object(MagentoCatalogModelProductInterceptor))
      #24 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogModelResourceModelProductInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoCatalogModelProductInterceptor))
      #25 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(39): MagentoCatalogModelResourceModelProductInterceptor->___callPlugins('save', Array, Array)
      #26 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Model/AbstractModel.php(647): MagentoCatalogModelResourceModelProductInterceptor->save(Object(MagentoCatalogModelProductInterceptor))
      #27 /var/www/html/staging.testsite.com.au/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(111): MagentoFrameworkModelAbstractModel->save()
      #28 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Action/Action.php(107): MagentoCatalogControllerAdminhtmlProductSave->execute()
      #29 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/AbstractAction.php(235): MagentoFrameworkAppActionAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #30 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoBackendAppAbstractAction->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #31 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callParent('dispatch', Array)
      #32 /var/www/html/staging.testsite.com.au/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
      #33 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(135): MagentoBackendAppActionPluginAuthentication->aroundDispatch(Object(MagentoCatalogControllerAdminhtmlProductSaveInterceptor), Object(Closure), Object(MagentoFrameworkAppRequestHttp))
      #34 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
      #35 /var/www/html/staging.testsite.com.au/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(26): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->___callPlugins('dispatch', Array, NULL)
      #36 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/FrontController.php(55): MagentoCatalogControllerAdminhtmlProductSaveInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #37 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppFrontController->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #38 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', Array)
      #39 /var/www/html/staging.testsite.com.au/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppRequestHttp))
      #40 /var/www/html/staging.testsite.com.au/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', Array, Array)
      #41 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Http.php(135): MagentoFrameworkAppFrontControllerInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))
      #42 /var/www/html/staging.testsite.com.au/vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttp->launch()
      #43 /var/www/html/staging.testsite.com.au/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
      #44 {main}


      Any advice would be much appreciated. Thanks







      magento2





      share







      New contributor




      Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 mins ago









      AlpeAlpe

      1




      1




      New contributor




      Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Alpe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Alpe is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f272152%2fmagento-2-2-6-unable-to-save-stock-item-error%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Alpe is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Alpe is a new contributor. Be nice, and check out our Code of Conduct.













          Alpe is a new contributor. Be nice, and check out our Code of Conduct.












          Alpe is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f272152%2fmagento-2-2-6-unable-to-save-stock-item-error%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          What other Star Trek series did the main TNG cast show up in?

          Berlina muro

          Berlina aerponto