Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2.1.5 Category Save error #9517

Closed
prdptom opened this issue May 4, 2017 · 2 comments
Closed

Magento 2.1.5 Category Save error #9517

prdptom opened this issue May 4, 2017 · 2 comments
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@prdptom
Copy link

prdptom commented May 4, 2017

Preconditions

  1. Migrated DB from 1.9.1.0 to Magento 2.1.5

Steps to reproduce

  1. Saving changes in already present category

Expected result

  1. Category has been saved

Actual result

  1. [Screenshot, logs]

Next 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}

@korostii
Copy link
Contributor

korostii commented May 4, 2017

There's a separate repository for the data migration tool. You might get a meaningful answer on this topic in there faster than here.

@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team
Copy link
Contributor

Hi @prdptom
For migration related issues please use the correct repository: https://github.com/magento/data-migration-tool

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

3 participants