cancel
Showing results for 
Search instead for 
Did you mean: 

Notice: Undefined index: category_id in Magento 2

Notice: Undefined index: category_id in Magento 2

In Magento 2.1.12, I'm not able to assign product to particular category(xyz and subcatgory of xyz). I'm getting the following error, Please help me to fix.

 

 

[2018-07-25 14:21:46] main.CRITICAL: Exception: Notice: Undefined index: category_id in /home/buriedtreasurefo/public_html/vendor/magento/module-catalog-url-rewrite/Model/Category/Plugin/Storage.php on line 57 in /home/buriedtreasurefo/public_html/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace:

0 /home/buriedtreasurefo/public_html/vendor/magento/module-catalog-url-rewrite/Model/Category/Plugin/Storage.php(57): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/home/buriedtre...', 57, Array) 1 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\CatalogUrlRewrite\Model\Category\Plugin\Storage->aroundReplace(Object(BuriedTreasureFossils\UrlRewriteFix\Model\Magento\UrlRewrite\DbStorage\Interceptor), Object(Closure), Array) 2 /home/buriedtreasurefo/public_html/var/generation/BuriedTreasureFossils/UrlRewriteFix/Model/Magento/UrlRewrite/DbStorage/Interceptor.php(65): BuriedTreasureFossils\UrlRewriteFix\Model\Magento\UrlRewrite\DbStorage\Interceptor->___callPlugins('replace', Array, Array) 3 /home/buriedtreasurefo/public_html/vendor/magento/module-catalog-url-rewrite/Observer/ProductProcessUrlRewriteSavingObserver.php(61): BuriedTreasureFossils\UrlRewriteFix\Model\Magento\UrlRewrite\DbStorage\Interceptor->replace(Array) 4 /home/buriedtreasurefo/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteSavingObserver->execute(Object(Magento\Framework\Event\Observer)) 5 /home/buriedtreasurefo/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteSavingObserver), Object(Magento\Framework\Event\Observer)) 6 /home/buriedtreasurefo/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) 7 /home/buriedtreasurefo/public_html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_product...', Array) 8 /home/buriedtreasurefo/public_html/vendor/magento/framework/Model/AbstractModel.php(807): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_product...', Array) 9 /home/buriedtreasurefo/public_html/vendor/magento/module-catalog/Model/Product.php(921): Magento\Framework\Model\AbstractModel->afterSave() 10 /home/buriedtreasurefo/public_html/var/generation/Magento/Catalog/Model/Product/Interceptor.php(362): Magento\Catalog\Model\Product->afterSave() 11 /home/buriedtreasurefo/public_html/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(34): Magento\Catalog\Model\Product\Interceptor->afterSave() 12 /home/buriedtreasurefo/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Framework\EntityManager\Observer\AfterEntitySave->execute(Object(Magento\Framework\Event\Observer)) 13 /home/buriedtreasurefo/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Framework\EntityManager\Observer\AfterEntitySave), Object(Magento\Framework\Event\Observer)) 14 /home/buriedtreasurefo/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) 15 /home/buriedtreasurefo/public_html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('magento_catalog...', Array) 16 /home/buriedtreasurefo/public_html/vendor/magento/framework/EntityManager/EventManager.php(52): Magento\Framework\Event\Manager\Proxy->dispatch('magento_catalog...', Array) 17 /home/buriedtreasurefo/public_html/vendor/magento/framework/EntityManager/Operation/Update.php(108): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent('Magento\Catalog...', 'save_after', Array) 18 /home/buriedtreasurefo/public_html/vendor/magento/framework/EntityManager/EntityManager.php(87): Magento\Framework\EntityManager\Operation\Update->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array) 19 /home/buriedtreasurefo/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product.php(695): Magento\Framework\EntityManager\EntityManager->save(Object(Magento\Catalog\Model\Product\Interceptor)) 20 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Catalog\Model\ResourceModel\Product->save(Object(Magento\Catalog\Model\Product\Interceptor)) 21 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callParent('save', Array) 22 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Array, 'apply_catalog_r...') 23 /home/buriedtreasurefo/public_html/vendor/magento/module-catalog-rule/Plugin/Indexer/Product/Save/ApplyRules.php(40): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Catalog\Model\Product\Interceptor)) 24 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\CatalogRule\Plugin\Indexer\Product\Save\ApplyRules->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor)) 25 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Array, 'catalogsearchFu...') 26 /home/buriedtreasurefo/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(51): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Catalog\Model\Product\Interceptor)) 27 /home/buriedtreasurefo/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)) 28 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor)) 29 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Array, 'clean_cache') 30 /home/buriedtreasurefo/public_html/vendor/magento/framework/App/Cache/FlushCacheByTags.php(71): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Catalog\Model\Product\Interceptor)) 31 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Product\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Product\Interceptor)) 32 /home/buriedtreasurefo/public_html/var/generation/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(273): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callPlugins('save', Array, Array) 33 /home/buriedtreasurefo/public_html/vendor/magento/framework/Model/AbstractModel.php(636): Magento\Catalog\Model\ResourceModel\Product\Interceptor->save(Object(Magento\Catalog\Model\Product\Interceptor)) 34 /home/buriedtreasurefo/public_html/var/generation/Magento/Catalog/Model/Product/Interceptor.php(2377): Magento\Framework\Model\AbstractModel->save() 35 /home/buriedtreasurefo/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(110): Magento\Catalog\Model\Product\Interceptor->save() 36 /home/buriedtreasurefo/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\Save->execute() 37 /home/buriedtreasurefo/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->execute() 38 /home/buriedtreasurefo/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) 39 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http)) 40 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent('dispatch', Array) 41 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Array, 'adminAuthentica...') 42 /home/buriedtreasurefo/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http)) 43 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) 44 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Array, 'adminMassaction...') 45 /home/buriedtreasurefo/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) 46 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) 47 /home/buriedtreasurefo/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins('dispatch', Array, Array) 48 /home/buriedtreasurefo/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) 49 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http)) 50 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array) 51 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install') 52 /home/buriedtreasurefo/public_html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http)) 53 /home/buriedtreasurefo/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) 54 /home/buriedtreasurefo/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) 55 /home/buriedtreasurefo/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) 56 /home/buriedtreasurefo/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() 57 /home/buriedtreasurefo/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) 58 {main} [] []

1 REPLY 1

Re: Notice: Undefined index: category_id in Magento 2