{"action":"closed","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/9517","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/9517/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/9517/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/9517/events","html_url":"https://github.com/magento/magento2/issues/9517","id":226357854,"number":9517,"title":"Magento 2.1.5 Category Save error","user":{"login":"prdptom","id":22837574,"avatar_url":"https://avatars1.githubusercontent.com/u/22837574?v=4","gravatar_id":"","url":"https://api.github.com/users/prdptom","html_url":"https://github.com/prdptom","followers_url":"https://api.github.com/users/prdptom/followers","following_url":"https://api.github.com/users/prdptom/following{/other_user}","gists_url":"https://api.github.com/users/prdptom/gists{/gist_id}","starred_url":"https://api.github.com/users/prdptom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prdptom/subscriptions","organizations_url":"https://api.github.com/users/prdptom/orgs","repos_url":"https://api.github.com/users/prdptom/repos","events_url":"https://api.github.com/users/prdptom/events{/privacy}","received_events_url":"https://api.github.com/users/prdptom/received_events","type":"User","site_admin":false},"labels":[{"id":688811200,"url":"https://api.github.com/repos/magento/magento2/labels/G1%20Passed","name":"G1 Passed","color":"0e8a16","default":false},{"id":398412211,"url":"https://api.github.com/repos/magento/magento2/labels/Migration%20Tools","name":"Migration Tools","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-04T17:45:33Z","updated_at":"2017-11-17T11:15:12Z","closed_at":"2017-11-17T11:15:12Z","author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n<!--- Before adding new issues, please, check this article https://github.com/magento/magento2/wiki/Issue-reporting-guidelines-->\r\n\r\n### Preconditions\r\n<!--- Provide a more detailed information of environment you use -->\r\n<!--- Magento version, tag, HEAD, etc., PHP & MySQL version, etc.. -->\r\n1. Migrated DB from 1.9.1.0 to Magento 2.1.5\r\n\r\n\r\n### Steps to reproduce\r\n<!--- Provide a set of unambiguous steps to reproduce this bug include code, if relevant  -->\r\n1.  Saving changes in already present category \r\n\r\n\r\n### Expected result\r\n<!--- Tell us what should happen -->\r\n1.  Category has been saved\r\n\r\n### Actual result\r\n<!--- Tell us what happens instead -->\r\n1. [Screenshot, logs]\r\n\r\n<!--- (This may be platform independent comment) -->\r\nNext exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`migrateddb`.`catalog_url_rewrite_product_category`, CONSTRAINT `CAT_URL_REWRITE_PRD_CTGR_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity), query was: INSERT INTO `catalog_url_rewrite_product_category` (`url_rewrite_id`,`category_id`,`product_id`) VALUES (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?)' in /var/www/html/dev/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235 Stack trace: #0 /var/www/html/dev/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array) #1 /var/www/html/dev/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\\Framework\\DB\\Statement\\Pdo\\Mysql->_execute(Array) #2 /var/www/html/dev/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #3 /var/www/html/dev/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) #4 /var/www/html/dev/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) #5 /var/www/html/dev/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\\Framework\\DB\\Adapter\\Pdo\\Mysql->_query('INSERT INTO `ca...', Array) #6 /var/www/html/dev/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(1939): Magento\\Framework\\DB\\Adapter\\Pdo\\Mysql->query('INSERT INTO `ca...', Array) #7 /var/www/html/dev/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(1903): Magento\\Framework\\DB\\Adapter\\Pdo\\Mysql->insertArray('catalog_url_rew...', Array, Array) #8 /var/www/html/dev/vendor/magento/module-catalog-url-rewrite/Model/ResourceModel/Category/Product.php(52): Magento\\Framework\\DB\\Adapter\\Pdo\\Mysql->insertMultiple('catalog_url_rew...', Array) #9 /var/www/html/dev/vendor/magento/module-catalog-url-rewrite/Model/Category/Plugin/Storage.php(54): Magento\\CatalogUrlRewrite\\Model\\ResourceModel\\Category\\Product->saveMultiple(Array) #10 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(142): Magento\\CatalogUrlRewrite\\Model\\Category\\Plugin\\Storage->aroundReplace(Object(Magento\\UrlRewrite\\Model\\Storage\\DbStorage\\Interceptor), Object(Closure), Array) #11 /var/www/html/dev/var/generation/Magento/UrlRewrite/Model/Storage/DbStorage/Interceptor.php(65): Magento\\UrlRewrite\\Model\\Storage\\DbStorage\\Interceptor->___callPlugins('replace', Array, Array) #12 /var/www/html/dev/vendor/magento/module-catalog-url-rewrite/Observer/CategoryProcessUrlRewriteSavingObserver.php(60): Magento\\UrlRewrite\\Model\\Storage\\DbStorage\\Interceptor->replace(Array) #13 /var/www/html/dev/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\\CatalogUrlRewrite\\Observer\\CategoryProcessUrlRewriteSavingObserver->execute(Object(Magento\\Framework\\Event\\Observer)) #14 /var/www/html/dev/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\\Framework\\Event\\Invoker\\InvokerDefault->_callObserverMethod(Object(Magento\\CatalogUrlRewrite\\Observer\\CategoryProcessUrlRewriteSavingObserver), Object(Magento\\Framework\\Event\\Observer)) #15 /var/www/html/dev/vendor/magento/framework/Event/Manager.php(66): Magento\\Framework\\Event\\Invoker\\InvokerDefault->dispatch(Array, Object(Magento\\Framework\\Event\\Observer)) #16 /var/www/html/dev/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\\Framework\\Event\\Manager->dispatch('catalog_categor...', Array) #17 /var/www/html/dev/vendor/magento/framework/Model/AbstractModel.php(802): Magento\\Framework\\Event\\Manager\\Proxy->dispatch('catalog_categor...', Array) #18 /var/www/html/dev/vendor/magento/module-catalog/Model/Category.php(1077): Magento\\Framework\\Model\\AbstractModel->afterSave() #19 /var/www/html/dev/var/generation/Magento/Catalog/Model/Category/Interceptor.php(583): Magento\\Catalog\\Model\\Category->afterSave() #20 /var/www/html/dev/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(34): Magento\\Catalog\\Model\\Category\\Interceptor->afterSave() #21 /var/www/html/dev/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\\Framework\\EntityManager\\Observer\\AfterEntitySave->execute(Object(Magento\\Framework\\Event\\Observer)) #22 /var/www/html/dev/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)) #23 /var/www/html/dev/vendor/magento/framework/Event/Manager.php(66): Magento\\Framework\\Event\\Invoker\\InvokerDefault->dispatch(Array, Object(Magento\\Framework\\Event\\Observer)) #24 /var/www/html/dev/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\\Framework\\Event\\Manager->dispatch('magento_catalog...', Array) #25 /var/www/html/dev/vendor/magento/framework/EntityManager/EventManager.php(53): Magento\\Framework\\Event\\Manager\\Proxy->dispatch('magento_catalog...', Array) #26 /var/www/html/dev/vendor/magento/framework/EntityManager/Operation/Update.php(108): Magento\\Framework\\EntityManager\\EventManager->dispatchEntityEvent('Magento\\\\Catalog...', 'save_after', Array) #27 /var/www/html/dev/vendor/magento/framework/EntityManager/EntityManager.php(87): Magento\\Framework\\EntityManager\\Operation\\Update->execute(Object(Magento\\Catalog\\Model\\Category\\Interceptor), Array) #28 /var/www/html/dev/vendor/magento/module-catalog/Model/ResourceModel/Category.php(1027): Magento\\Framework\\EntityManager\\EntityManager->save(Object(Magento\\Catalog\\Model\\Category\\Interceptor)) #29 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(74): Magento\\Catalog\\Model\\ResourceModel\\Category->save(Object(Magento\\Catalog\\Model\\Category\\Interceptor)) #30 /var/www/html/dev/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\\Catalog\\Model\\ResourceModel\\Category\\Interceptor->___callParent('save', Array) #31 /var/www/html/dev/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, 'clean_cache') #32 /var/www/html/dev/vendor/magento/framework/App/Cache/FlushCacheByTags.php(71): Magento\\Framework\\Interception\\Chain\\Chain->Magento\\Framework\\Interception\\Chain\\{closure}(Object(Magento\\Catalog\\Model\\Category\\Interceptor)) #33 /var/www/html/dev/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\\Framework\\App\\Cache\\FlushCacheByTags->aroundSave(Object(Magento\\Catalog\\Model\\ResourceModel\\Category\\Interceptor), Object(Closure), Object(Magento\\Catalog\\Model\\Category\\Interceptor)) #34 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Framework\\Interception\\Chain\\Chain->invokeNext('Magento\\\\Catalog...', 'save', Object(Magento\\Catalog\\Model\\ResourceModel\\Category\\Interceptor), Array, 'catalogsearchFu...') #35 /var/www/html/dev/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Category.php(43): Magento\\Catalog\\Model\\ResourceModel\\Category\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Catalog\\Model\\Category\\Interceptor)) #36 /var/www/html/dev/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)) #37 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(142): Magento\\CatalogSearch\\Model\\Indexer\\Fulltext\\Plugin\\Category->aroundSave(Object(Magento\\Catalog\\Model\\ResourceModel\\Category\\Interceptor), Object(Closure), Object(Magento\\Catalog\\Model\\Category\\Interceptor)) #38 /var/www/html/dev/var/generation/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(364): Magento\\Catalog\\Model\\ResourceModel\\Category\\Interceptor->___callPlugins('save', Array, Array) #39 /var/www/html/dev/vendor/magento/framework/Model/AbstractModel.php(631): Magento\\Catalog\\Model\\ResourceModel\\Category\\Interceptor->save(Object(Magento\\Catalog\\Model\\Category\\Interceptor)) #40 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(146): Magento\\Framework\\Model\\AbstractModel->save() #41 /var/www/html/dev/var/generation/Magento/Catalog/Model/Category/Interceptor.php(1534): Magento\\Catalog\\Model\\Category\\Interceptor->___callPlugins('save', Array, Array) #42 /var/www/html/dev/vendor/magento/module-catalog/Controller/Adminhtml/Category/Save.php(203): Magento\\Catalog\\Model\\Category\\Interceptor->save() #43 /var/www/html/dev/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(24): Magento\\Catalog\\Controller\\Adminhtml\\Category\\Save->execute() #44 /var/www/html/dev/vendor/magento/framework/App/Action/Action.php(102): Magento\\Catalog\\Controller\\Adminhtml\\Category\\Save\\Interceptor->execute() #45 /var/www/html/dev/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http)) #46 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(74): Magento\\Backend\\App\\AbstractAction->dispatch(Object(Magento\\Framework\\App\\Request\\Http)) #47 /var/www/html/dev/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\\Catalog\\Controller\\Adminhtml\\Category\\Save\\Interceptor->___callParent('dispatch', Array) #48 /var/www/html/dev/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...') #49 /var/www/html/dev/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)) #50 /var/www/html/dev/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)) #51 /var/www/html/dev/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...') #52 /var/www/html/dev/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)) #53 /var/www/html/dev/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)) #54 /var/www/html/dev/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(65): Magento\\Catalog\\Controller\\Adminhtml\\Category\\Save\\Interceptor->___callPlugins('dispatch', Array, Array) #55 /var/www/html/dev/vendor/magento/framework/App/FrontController.php(55): Magento\\Catalog\\Controller\\Adminhtml\\Category\\Save\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http)) #56 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(74): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http)) #57 /var/www/html/dev/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', Array) #58 /var/www/html/dev/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Framework\\Interception\\Chain\\Chain->invokeNext('Magento\\\\Framewo...', 'dispatch', Object(Magento\\Framework\\App\\FrontController\\Interceptor), Array, 'install') #59 /var/www/html/dev/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http)) #60 /var/www/html/dev/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)) #61 /var/www/html/dev/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', Array, Array) #62 /var/www/html/dev/vendor/magento/framework/App/Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http)) #63 /var/www/html/dev/vendor/magento/framework/App/Bootstrap.php(258): Magento\\Framework\\App\\Http->launch() #64 /var/www/html/dev/index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http)) #65 {main}"}}
{"actor":{"display_login":"magento-engcom-team"}}