1

I have already uploaded the product details in to magento, but whenever i try to make any small change (example: quantity) it does not work and it gives me this error:

Unable to save Stock Item

I have already tried several times and i always get this error message. Can you guys help me with this issue.

enter image description here

VAR/SYSTEM.LOG ERROR DETAILS:

[2018-02-21 04:36:22] main.CRITICAL: Exception message: Unable to save Stock Item
Trace: #0 /home/tesefa/public_html/vendor/magento/module-catalog-inventory/Model/StockRegistry.php(180): Magento\CatalogInventory\Model\Stock\StockItemRepository->save(Object(Magento\CatalogInventory\Model\Adminhtml\Stock\Item))
#1 /home/tesefa/public_html/vendor/magento/module-catalog-inventory/Observer/SaveInventoryDataObserver.php(110): Magento\CatalogInventory\Model\StockRegistry->updateStockItemBySku('Tevere-7353-992', Object(Magento\CatalogInventory\Model\Adminhtml\Stock\Item))
#2 /home/tesefa/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): Magento\CatalogInventory\Observer\SaveInventoryDataObserver->execute(Object(Magento\Framework\Event\Observer))
#3 /home/tesefa/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CatalogInventory\Observer\SaveInventoryDataObserver), Object(Magento\Framework\Event\Observer))
#4 /home/tesefa/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#5 /home/tesefa/public_html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_product...', Array)
#6 /home/tesefa/public_html/vendor/magento/framework/Model/AbstractModel.php(818): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_product...', Array)
#7 /home/tesefa/public_html/vendor/magento/module-catalog/Model/Product.php(928): Magento\Framework\Model\AbstractModel->afterSave()
#8 /home/tesefa/public_html/generated/code/Magento/Catalog/Model/Product/Interceptor.php(362): Magento\Catalog\Model\Product->afterSave()
#9 /home/tesefa/public_html/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(34): Magento\Catalog\Model\Product\Interceptor->afterSave()
#10 /home/tesefa/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): Magento\Framework\EntityManager\Observer\AfterEntitySave->execute(Object(Magento\Framework\Event\Observer))
#11 /home/tesefa/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Framework\EntityManager\Observer\AfterEntitySave), Object(Magento\Framework\Event\Observer))
#12 /home/tesefa/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#13 /home/tesefa/public_html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('magento_catalog...', Array)
#14 /home/tesefa/public_html/vendor/magento/framework/EntityManager/EventManager.php(52): Magento\Framework\Event\Manager\Proxy->dispatch('magento_catalog...', Array)
#15 /home/tesefa/public_html/vendor/magento/framework/EntityManager/Operation/Update.php(110): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent('Magento\\Catalog...', 'save_after', Array)
#16 /home/tesefa/public_html/vendor/magento/framework/EntityManager/EntityManager.php(96): Magento\Framework\EntityManager\Operation\Update->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array)
#17 /home/tesefa/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product.php(626): Magento\Framework\EntityManager\EntityManager->save(Object(Magento\Catalog\Model\Product\Interceptor))
#18 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Model\ResourceModel\Product->save(Object(Magento\Catalog\Model\Product\Interceptor))
#19 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callParent('save', Array)
#20 /home/tesefa/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(51): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Product\Interceptor))
#21 /home/tesefa/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(24): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->addCommitCallback(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor))
#22 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor))
#23 /home/tesefa/public_html/vendor/magento/framework/App/Cache/FlushCacheByTags.php(68): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Product\Interceptor))
#24 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor))
#25 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Product\Interceptor))
#26 /home/tesefa/public_html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(273): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callPlugins('save', Array, Array)
#27 /home/tesefa/public_html/vendor/magento/framework/Model/AbstractModel.php(647): Magento\Catalog\Model\ResourceModel\Product\Interceptor->save(Object(Magento\Catalog\Model\Product\Interceptor))
#28 /home/tesefa/public_html/generated/code/Magento/Catalog/Model/Product/Interceptor.php(2429): Magento\Framework\Model\AbstractModel->save()
#29 /home/tesefa/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(110): Magento\Catalog\Model\Product\Interceptor->save()
#30 /home/tesefa/public_html/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\Save->execute()
#31 /home/tesefa/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->execute()
#32 /home/tesefa/public_html/vendor/magento/module-backend/App/AbstractAction.php(229): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#33 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent('dispatch', Array)
#35 /home/tesefa/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#36 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#38 /home/tesefa/public_html/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins('dispatch', Array, NULL)
#39 /home/tesefa/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#40 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#41 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#42 /home/tesefa/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#43 /home/tesefa/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#44 /home/tesefa/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#45 /home/tesefa/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#46 /home/tesefa/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#47 {main} [] []
  • please check var/system.log and exception.log so we may get exact problem. – Dhaval Solanki Feb 21 '18 at 4:24
  • Are you using Nginx. If you are then please use the Nginx conf for that came with Magento – Sohaib Khan Feb 21 '18 at 4:30
  • No. I am using - Apache Version - 2.4.29, PHP Version - 5.6.33, MySQL Version - 5.6.38 – Venkatesha Feb 21 '18 at 4:33
  • I have uploaded the VAR/SYSTEM.LOG also. Can you guys help me! – Venkatesha Feb 21 '18 at 4:38
  • Magento 2.2 in php 5.6? check here devdocs.magento.com/guides/v2.2/install-gde/… – Sohel Rana Feb 21 '18 at 4:42
0

Please re-index the data by running below command after navigating to Magento root directory:

php bin/magento indexer:reindex

Flush the cache(php bin/magento cache:flush) and then try saving the product again.

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.