cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot add products in Magento 2.1.11. "Unable to save Stock Item" error

Re: Cannot add products in Magento 2.1.11. "Unable to save Stock Item" error

Hi, 

I had the same issue and I solved it.

The problem comes from the cleaning data that you executed, actually, you should not truncate the table : cataloginventory_stock

 

It does contain initial information.

If you retrieve your Data Base,  execute all query except for the TRUNCATE TABLE `cataloginventory_stock`;

 

It should work.

 

 

Re: Cannot add products in Magento 2.1.11. "Unable to save Stock Item" error

You should execute this in mysql

 

use <database_magento>;

insert into `cataloginventory_stock`(`stock_id`,`stock_name`) values (1,'Default');

 

 

Re: Cannot add products in Magento 2.1.11. "Unable to save Stock Item" error

This is working fine on 2.3.1 version.

insert into `cataloginventory_stock`(`stock_id`,`website_id`,`stock_name`) values (1,0,'Default');

Re: Cannot add products in Magento 2.1.11. "Unable to save Stock Item" error

Not Solved 

Re: Cannot add products in Magento 2.1.11. "Unable to save Stock Item" error

Thanks, It's working for me the magento version 2.3.2