cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error when we save the category it says No such entity with id = xx

Getting error when we save the category it says No such entity with id = xx

Getting error when we save the category it says No such entity with id = xx  it happens when we recently deleted few categories from system and done change the category hierarchy and ordering. Please can you guide how can I fix this problem ?

 

 

 

Getting below error in exception log stack trace

[2018-03-06 15:39:30] main.CRITICAL: Magento\Framework\Exception\NoSuchEntityException: No such entity with id = 381 in /home/betasitesunenter/public_html/vendor/magento/framework/Exception/NoSuchEntityException.php:45
Stack trace:
#0 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Model/CategoryRepository.php(141): Magento\Framework\Exception\NoSuchEntityException::singleField('id', '381')
#1 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Model/CategoryUrlPathGenerator.php(77): Magento\Catalog\Model\CategoryRepository->get('381', 0)
#2 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Observer/CategoryUrlPathAutogeneratorObserver.php(109): Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator->getUrlPath(Object(Magento\Catalog\Model\Category\Interceptor))
#3 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Observer/CategoryUrlPathAutogeneratorObserver.php(79): Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver->updateUrlPathForCategory(Object(Magento\Catalog\Model\Category\Interceptor))
#4 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Observer/CategoryUrlPathAutogeneratorObserver.php(56): Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver->updateUrlPathForChildren(Object(Magento\Catalog\Model\Category\Interceptor))
#5 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver->execute(Object(Magento\Framework\Event\Observer))
#6 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver), Object(Magento\Framework\Event\Observer))
#7 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#8 /home/betasitesunenter/public_html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_categor...', Array)
#9 /home/betasitesunenter/public_html/vendor/magento/framework/Model/AbstractModel.php(678): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_categor...', Array)
#10 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Model/AbstractModel.php(381): Magento\Framework\Model\AbstractModel->beforeSave()
#11 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Model/Category/Interceptor.php(1194): Magento\Catalog\Model\AbstractModel->beforeSave()
#12 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/Observer/BeforeEntitySave.php(35): Magento\Catalog\Model\Category\Interceptor->beforeSave()
#13 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Framework\EntityManager\Observer\BeforeEntitySave->execute(Object(Magento\Framework\Event\Observer))
#14 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Framework\EntityManager\Observer\BeforeEntitySave), Object(Magento\Framework\Event\Observer))
#15 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#16 /home/betasitesunenter/public_html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('magento_catalog...', Array)
#17 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/EventManager.php(52): Magento\Framework\Event\Manager\Proxy->dispatch('magento_catalog...', Array)
#18 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/Operation/Update.php(104): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent('Magento\\Catalog...', 'save_before', Array)
#19 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/EntityManager.php(87): Magento\Framework\EntityManager\Operation\Update->execute(Object(Magento\Catalog\Model\Category\Interceptor), Array)
#20 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Model/ResourceModel/Category.php(1025): Magento\Framework\EntityManager\EntityManager->save(Object(Magento\Catalog\Model\Category\Interceptor))
#21 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Catalog\Model\ResourceModel\Category->save(Object(Magento\Catalog\Model\Category\Interceptor))
#22 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Model\ResourceModel\Category\Interceptor->___callParent('save', Array)
#23 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Array, 'catalogsearchFu...')
#24 /home/betasitesunenter/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Category.php(43): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Catalog\Model\Category\Interceptor))
#25 /home/betasitesunenter/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Category.php(29): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Category->addCommitCallback(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
#26 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Category->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
#27 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Array, 'clean_cache')
#28 /home/betasitesunenter/public_html/vendor/magento/framework/App/Cache/FlushCacheByTags.php(60): Magento\Catalog\Model\ResourceModel\Category\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Category\Interceptor))
#29 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
#30 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(364): Magento\Catalog\Model\ResourceModel\Category\Interceptor->___callPlugins('save', Array, Array)
#31 /home/betasitesunenter/public_html/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Catalog\Model\ResourceModel\Category\Interceptor->save(Object(Magento\Catalog\Model\Category\Interceptor))
#32 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\Model\AbstractModel->save()
#33 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Model/Category/Interceptor.php(1534): Magento\Catalog\Model\Category\Interceptor->___callPlugins('save', Array, Array)
#34 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Category/Save.php(212): Magento\Catalog\Model\Category\Interceptor->save()
#35 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Category\Save->execute()
#36 /home/betasitesunenter/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->execute()
#37 /home/betasitesunenter/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#38 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#39 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->___callParent('dispatch', Array)
#40 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Array, 'adminAuthentica...')
#41 /home/betasitesunenter/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))
#42 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#43 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Array, 'adminMassaction...')
#44 /home/betasitesunenter/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#45 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#46 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(65): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->___callPlugins('dispatch', Array, Array)
#47 /home/betasitesunenter/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#48 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#49 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#50 /home/betasitesunenter/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')
#51 /home/betasitesunenter/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))
#52 /home/betasitesunenter/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))
#53 /home/betasitesunenter/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#54 /home/betasitesunenter/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#55 /home/betasitesunenter/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#56 /home/betasitesunenter/public_html/index.php(42): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#57 {main} 
5 REPLIES 5

Re: Getting error when we save the category it says No such entity with id = xx

Hi @shoaibkha9,

1. Are the categories migrated from M1 or categories created in M2 itself?
2. Is the root category ('Default Category') related to "Dutch" store as shown in the screenshot or it is related to a different store?

Please check the logs and send us the stack trace. Meanwhile, I suggest you check the database for the category with ID 378 and its store code. 

--------
Give Kudos if it helped or Accept it as solution

Re: Getting error when we save the category it says No such entity with id = xx

Hello,

 

Thank you for reply.

 

Actually we are using same category for all store and category name is changed as per language in different store like Dutch Spanish etc. I am getting below in exception log. Please help.

 

Re: Getting error when we save the category it says No such entity with id = xx

Hello,

 

1. No we have not migrated categories from M1 to M2

2. We have same categories in all store. Stores are form for multi language.

Below is the stack trace error we are getting in exception log.

<<<

[2018-03-06 15:39:30] main.CRITICAL: Magento\Framework\Exception\NoSuchEntityException: No such entity with id = 381 in /home/betasitesunenter/public_html/vendor/magento/framework/Exception/NoSuchEntityException.php:45
Stack trace:
#0 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Model/CategoryRepository.php(141): Magento\Framework\Exception\NoSuchEntityException::singleField('id', '381')
#1 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Model/CategoryUrlPathGenerator.php(77): Magento\Catalog\Model\CategoryRepository->get('381', 0)
#2 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Observer/CategoryUrlPathAutogeneratorObserver.php(109): Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator->getUrlPath(Object(Magento\Catalog\Model\Category\Interceptor))
#3 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Observer/CategoryUrlPathAutogeneratorObserver.php(79): Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver->updateUrlPathForCategory(Object(Magento\Catalog\Model\Category\Interceptor))
#4 /home/betasitesunenter/public_html/vendor/magento/module-catalog-url-rewrite/Observer/CategoryUrlPathAutogeneratorObserver.php(56): Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver->updateUrlPathForChildren(Object(Magento\Catalog\Model\Category\Interceptor))
#5 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver->execute(Object(Magento\Framework\Event\Observer))
#6 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogeneratorObserver), Object(Magento\Framework\Event\Observer))
#7 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#8 /home/betasitesunenter/public_html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_categor...', Array)
#9 /home/betasitesunenter/public_html/vendor/magento/framework/Model/AbstractModel.php(678): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_categor...', Array)
#10 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Model/AbstractModel.php(381): Magento\Framework\Model\AbstractModel->beforeSave()
#11 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Model/Category/Interceptor.php(1194): Magento\Catalog\Model\AbstractModel->beforeSave()
#12 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/Observer/BeforeEntitySave.php(35): Magento\Catalog\Model\Category\Interceptor->beforeSave()
#13 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Framework\EntityManager\Observer\BeforeEntitySave->execute(Object(Magento\Framework\Event\Observer))
#14 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Framework\EntityManager\Observer\BeforeEntitySave), Object(Magento\Framework\Event\Observer))
#15 /home/betasitesunenter/public_html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#16 /home/betasitesunenter/public_html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('magento_catalog...', Array)
#17 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/EventManager.php(52): Magento\Framework\Event\Manager\Proxy->dispatch('magento_catalog...', Array)
#18 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/Operation/Update.php(104): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent('Magento\\Catalog...', 'save_before', Array)
#19 /home/betasitesunenter/public_html/vendor/magento/framework/EntityManager/EntityManager.php(87): Magento\Framework\EntityManager\Operation\Update->execute(Object(Magento\Catalog\Model\Category\Interceptor), Array)
#20 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Model/ResourceModel/Category.php(1025): Magento\Framework\EntityManager\EntityManager->save(Object(Magento\Catalog\Model\Category\Interceptor))
#21 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Catalog\Model\ResourceModel\Category->save(Object(Magento\Catalog\Model\Category\Interceptor))
#22 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Model\ResourceModel\Category\Interceptor->___callParent('save', Array)
#23 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Array, 'catalogsearchFu...')
#24 /home/betasitesunenter/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Category.php(43): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Catalog\Model\Category\Interceptor))
#25 /home/betasitesunenter/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Category.php(29): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Category->addCommitCallback(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
#26 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Category->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
#27 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Array, 'clean_cache')
#28 /home/betasitesunenter/public_html/vendor/magento/framework/App/Cache/FlushCacheByTags.php(60): Magento\Catalog\Model\ResourceModel\Category\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Category\Interceptor))
#29 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
#30 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(364): Magento\Catalog\Model\ResourceModel\Category\Interceptor->___callPlugins('save', Array, Array)
#31 /home/betasitesunenter/public_html/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Catalog\Model\ResourceModel\Category\Interceptor->save(Object(Magento\Catalog\Model\Category\Interceptor))
#32 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\Model\AbstractModel->save()
#33 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Model/Category/Interceptor.php(1534): Magento\Catalog\Model\Category\Interceptor->___callPlugins('save', Array, Array)
#34 /home/betasitesunenter/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Category/Save.php(212): Magento\Catalog\Model\Category\Interceptor->save()
#35 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Category\Save->execute()
#36 /home/betasitesunenter/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->execute()
#37 /home/betasitesunenter/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#38 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#39 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->___callParent('dispatch', Array)
#40 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Array, 'adminAuthentica...')
#41 /home/betasitesunenter/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))
#42 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#43 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Array, 'adminMassaction...')
#44 /home/betasitesunenter/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#45 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#46 /home/betasitesunenter/public_html/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(65): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->___callPlugins('dispatch', Array, Array)
#47 /home/betasitesunenter/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#48 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#49 /home/betasitesunenter/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#50 /home/betasitesunenter/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')
#51 /home/betasitesunenter/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))
#52 /home/betasitesunenter/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))
#53 /home/betasitesunenter/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#54 /home/betasitesunenter/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#55 /home/betasitesunenter/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#56 /home/betasitesunenter/public_html/index.php(42): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#57 {main}

Re: Getting error when we save the category it says No such entity with id = xx

It happened to me also in 2.2.0 version.

 

In my case the problem was the url_rewrite table.
Check de "metadata" column of the url_rewrite table for non existing categories and delete those rows.

 

The problem are the url_rewrite rows of products belonging to that category.

Re: Getting error when we save the category it says No such entity with id = xx

Hi @shoaibkha9,

Sorry for the late reply. From the stack trace you shared, looks like your issue is similar to @ifuentes, please try what he suggested. If you have resolved it already, please share the solution that helped you.


--------
Give Kudos if it helped or if problem is solved Accept it as a solution