Magento – Cannot delete products in magento 2 admin. Catalog > Products: Grid

deleteproductsproducts-management

I check the box of the product that I want to delete and then use actions dropdown and select delete. Afterwards i get an exception error.

    1 exception(s):
Exception #0 (Magento\Framework\Exception\StateException): Unable to remove product 24-MB05

Exception #0 (Magento\Framework\Exception\StateException): Unable to remove product 24-MB05
#0 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Model\ProductRepository->delete(Object(Magento\Catalog\Model\Product\Interceptor))
#1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\ProductRepository\Interceptor->___callParent('delete', Array)
#2 /var/www/html/vendor/magento/module-shared-catalog/Plugin/Catalog/Api/AdminProductRepositoryInterfacePlugin.php(51): Magento\Catalog\Model\ProductRepository\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Product\Interceptor))
#3 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\SharedCatalog\Plugin\Catalog\Api\AdminProductRepositoryInterfacePlugin->aroundDelete(Object(Magento\Catalog\Model\ProductRepository\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor))
#4 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ProductRepository\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Product\Interceptor))
#5 /var/www/html/generated/code/Magento/Catalog/Model/ProductRepository/Interceptor.php(65): Magento\Catalog\Model\ProductRepository\Interceptor->___callPlugins('delete', Array, NULL)
#6 /var/www/html/vendor/magento/module-catalog/Controller/Adminhtml/Product/MassDelete.php(64): Magento\Catalog\Model\ProductRepository\Interceptor->delete(Object(Magento\Catalog\Model\Product\Interceptor))
#7 /var/www/html/generated/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\MassDelete->execute()
#8 /var/www/html/vendor/magento/framework/App/Action/Action.php(107): Magento\Catalog\Controller\Adminhtml\Product\MassDelete\Interceptor->execute()
#9 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(229): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#10 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#11 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\MassDelete\Interceptor->___callParent('dispatch', Array)
#12 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Catalog\Controller\Adminhtml\Product\MassDelete\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#13 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\MassDelete\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#14 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\MassDelete\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#15 /var/www/html/generated/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\MassDelete\Interceptor->___callPlugins('dispatch', Array, NULL)
#16 /var/www/html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\MassDelete\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#17 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#19 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#20 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#23 /var/www/html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#24 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#25 {main}

This is the Commerce Edition 2.2.3. I have the B2B extension installed but i've disabled shared catalogs and groups etc etc.

Best Answer

Try reindexing

php bin/magento indexer:reindex
Related Topic