Preconditions (*)
- Magento 2.2
- techdivision/import: 6.0.1
Steps to reproduce (*)
- Run an import-simple import:categories add-update comand with the fowlling file
store_view_code,attribute_set_code,path,name,is_active,is_anchor,include_in_menu,display_mode,url_key,description,image_path,meta_title,meta_keywords,meta_description,landing_page,position,path_in_store,custom_design,custom_design_from,custom_design_to,page_layout,custom_layout_update,available_sort_by,default_sort_by,custom_use_parent_settings,custom_apply_to_products,filter_price_range,created_at,updated_at,additional_attributes
,Default,Default Category/Innenbeleuchtung Klein,Innenbeleuchtung Klein,1,1,1,,,,,Innenbeleuchtung,,,,1,,,,,,,,,,,,,,
de,Default,Default Category/Innenbeleuchtung Klein,Innenbeleuchtung Klein,1,1,1,,,,,Innenbeleuchtung,,,,,,,,,,,,,,,,,,
es,Default,Default Category/Innenbeleuchtung Klein,Innenbeleuchtun Klein,1,1,1,,,,,Innenbeleuchtung,,,,,,,,,,,,,,,,,,
- Run an import-simple import:categories add-update comand with the fowlling file
store_view_code,attribute_set_code,path,name,is_active,is_anchor,include_in_menu,display_mode,url_key,description,image_path,meta_title,meta_keywords,meta_description,landing_page,position,path_in_store,custom_design,custom_design_from,custom_design_to,page_layout,custom_layout_update,available_sort_by,default_sort_by,custom_use_parent_settings,custom_apply_to_products,filter_price_range,created_at,updated_at,additional_attributes
,Default,Default Category/Innenbeleuchtung klein,Innenbeleuchtung klein,1,1,1,,,,,Innenbeleuchtung,,,,1,,,,,,,,,,,,,,
de,Default,Default Category/Innenbeleuchtung klein,Innenbeleuchtung klein,1,1,1,,,,,Innenbeleuchtung,,,,,,,,,,,,,,,,,,
es,Default,Default Category/Innenbeleuchtung klein,Innenbeleuchtun klein,1,1,1,,,,,Innenbeleuchtung,,,,,,,,,,,,,,,,,,
Expected result (*)
- Renaming from Innenbeleuchtung Klein to Innenbeleuchtung klein should be work fine.
Actual result (*)
- Import break with the following error
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'innenbeleuchtung-klein.html-2' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID' in /project/src/vendor/techdivision/import/src/Actions/Processors/AbstractBaseProcessor.php:146
Stack trace:
#0 /project/src/vendor/techdivision/import/src/Actions/Processors/AbstractBaseProcessor.php(146): PDOStatement->execute(Array)
#1 /project/src/vendor/techdivision/import/src/Actions/Processors/UrlRewriteCreateProcessor.php(58): TechDivision\Import\Actions\Processors\AbstractBaseProcessor->execute(Array, NULL)
#2 /project/src/vendor/techdivision/import/src/Actions/UrlRewriteAction.php(65): TechDivision\Import\Actions\Processors\UrlRewriteCreateProcessor->execute(Array, NULL)
#3 /project/src/vendor/techdivision/import/src/Actions/UrlRewriteAction.php(52): TechDivision\Import\Actions\UrlRewriteAction->create(Array)
#4 /project/src/vendor/techdivision/import-category/src/Services/CategoryBunchProcessor.php(1062): TechDivision\Import\Actions\UrlRewriteAction->persist(Array, NULL)
#5 /project/src/vendor/techdivision/import-category/src/Observers/UrlRewriteObserver.php(223): TechDivision\Import\Category\Services\CategoryBunchProcessor->persistUrlRewrite(Array)
#6 /project/src/vendor/techdivision/import-category/src/Observers/UrlRewriteObserver.php(105): TechDivision\Import\Category\Observers\UrlRewriteObserver->persistUrlRewrite(Array)
#7 /project/src/vendor/techdivision/import-category/src/Observers/UrlRewriteUpdateObserver.php(89): TechDivision\Import\Category\Observers\UrlRewriteObserver->process()
#8 /project/src/vendor/techdivision/import-category/src/Observers/AbstractCategoryImportObserver.php(54): TechDivision\Import\Category\Observers\UrlRewriteUpdateObserver->process()
#9 /project/src/vendor/techdivision/import/src/Subjects/AbstractSubject.php(823): TechDivision\Import\Category\Observers\AbstractCategoryImportObserver->handle(Object(TechDivision\Import\Category\Ee\Subjects\EeBunchSubject))
#10 [internal function]: TechDivision\Import\Subjects\AbstractSubject->importRow(Array)
#11 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Interpreter.php(149): call_user_func(Array, Array)
#12 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Interpreter.php(135): TechDivision\Import\Adapter\Goodby\Interpreter->delegate(Array, Array)
#13 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Interpreter.php(74): TechDivision\Import\Adapter\Goodby\Interpreter->notify(Array)
#14 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Lexer.php(120): TechDivision\Import\Adapter\Goodby\Interpreter->interpret(Array)
#15 /project/src/vendor/techdivision/import/src/Adapter/CsvImportAdapter.php(142): TechDivision\Import\Adapter\Goodby\Lexer->parse('/Volumes/Worksp...', Object(TechDivision\Import\Adapter\Goodby\Interpreter))
#16 /project/src/vendor/techdivision/import/src/Subjects/AbstractSubject.php(736): TechDivision\Import\Adapter\CsvImportAdapter->import(Array, '/Volumes/Worksp...')
#17 /project/src/vendor/techdivision/import/src/Plugins/SubjectExecutor.php(107): TechDivision\Import\Subjects\AbstractSubject->import('c000aa1a-9c61-4...', '/Volumes/Worksp...')
#18 /project/src/vendor/techdivision/import/src/Plugins/SubjectPlugin.php(186): TechDivision\Import\Plugins\SubjectExecutor->execute(Object(TechDivision\Import\Configuration\Jms\Configuration\Subject), Array, 'c000aa1a-9c61-4...', '/Volumes/Worksp...')
#19 /project/src/vendor/techdivision/import/src/Plugins/SubjectPlugin.php(121): TechDivision\Import\Plugins\SubjectPlugin->processSubject(Object(TechDivision\Import\Configuration\Jms\Configuration\Subject))
#20 /project/src/vendor/techdivision/import-app-simple/src/Simple.php(622): TechDivision\Import\Plugins\SubjectPlugin->process()
#21 /project/src/vendor/techdivision/import-cli-simple/src/Command/AbstractImportCommand.php(105): TechDivision\Import\App\Simple->process()
#22 /project/src/vendor/symfony/console/Command/Command.php(245): TechDivision\Import\Cli\Command\AbstractImportCommand->execute(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /project/src/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /project/src/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand(Object(TechDivision\Import\Cli\Command\ImportCategoriesCommand), Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /project/src/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /project/src/vendor/techdivision/import-cli-simple/bootstrap.php(39): Symfony\Component\Console\Application->run(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /project/src/vendor/techdivision/import-cli-simple/bin/import-simple.php(54): require('/Volumes/Worksp...')
#28 /project/src/vendor/techdivision/import-cli-simple/bin/import-simple(2): require('/Volumes/Worksp...')
#29 {main}
Next PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'innenbeleuchtung-klein.html-2' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID' when executing SQL "INSERT
INTO url_rewrite
(entity_type,
entity_id,
request_path,
target_path,
redirect_type,
store_id,
description,
is_autogenerated,
metadata)
VALUES (category,
703,
innenbeleuchtung-klein.html,
catalog/category/view/id/703,
0,
2,
,
1,
)" in /project/src/vendor/techdivision/import/src/Actions/Processors/AbstractBaseProcessor.php:160
Stack trace:
#0 /project/src/vendor/techdivision/import/src/Actions/Processors/UrlRewriteCreateProcessor.php(58): TechDivision\Import\Actions\Processors\AbstractBaseProcessor->execute(Array, NULL)
#1 /project/src/vendor/techdivision/import/src/Actions/UrlRewriteAction.php(65): TechDivision\Import\Actions\Processors\UrlRewriteCreateProcessor->execute(Array, NULL)
#2 /project/src/vendor/techdivision/import/src/Actions/UrlRewriteAction.php(52): TechDivision\Import\Actions\UrlRewriteAction->create(Array)
#3 /project/src/vendor/techdivision/import-category/src/Services/CategoryBunchProcessor.php(1062): TechDivision\Import\Actions\UrlRewriteAction->persist(Array, NULL)
#4 /project/src/vendor/techdivision/import-category/src/Observers/UrlRewriteObserver.php(223): TechDivision\Import\Category\Services\CategoryBunchProcessor->persistUrlRewrite(Array)
#5 /project/src/vendor/techdivision/import-category/src/Observers/UrlRewriteObserver.php(105): TechDivision\Import\Category\Observers\UrlRewriteObserver->persistUrlRewrite(Array)
#6 /project/src/vendor/techdivision/import-category/src/Observers/UrlRewriteUpdateObserver.php(89): TechDivision\Import\Category\Observers\UrlRewriteObserver->process()
#7 /project/src/vendor/techdivision/import-category/src/Observers/AbstractCategoryImportObserver.php(54): TechDivision\Import\Category\Observers\UrlRewriteUpdateObserver->process()
#8 /project/src/vendor/techdivision/import/src/Subjects/AbstractSubject.php(823): TechDivision\Import\Category\Observers\AbstractCategoryImportObserver->handle(Object(TechDivision\Import\Category\Ee\Subjects\EeBunchSubject))
#9 [internal function]: TechDivision\Import\Subjects\AbstractSubject->importRow(Array)
#10 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Interpreter.php(149): call_user_func(Array, Array)
#11 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Interpreter.php(135): TechDivision\Import\Adapter\Goodby\Interpreter->delegate(Array, Array)
#12 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Interpreter.php(74): TechDivision\Import\Adapter\Goodby\Interpreter->notify(Array)
#13 /project/src/vendor/techdivision/import/src/Adapter/Goodby/Lexer.php(120): TechDivision\Import\Adapter\Goodby\Interpreter->interpret(Array)
#14 /project/src/vendor/techdivision/import/src/Adapter/CsvImportAdapter.php(142): TechDivision\Import\Adapter\Goodby\Lexer->parse('/Volumes/Worksp...', Object(TechDivision\Import\Adapter\Goodby\Interpreter))
#15 /project/src/vendor/techdivision/import/src/Subjects/AbstractSubject.php(736): TechDivision\Import\Adapter\CsvImportAdapter->import(Array, '/Volumes/Worksp...')
#16 /project/src/vendor/techdivision/import/src/Plugins/SubjectExecutor.php(107): TechDivision\Import\Subjects\AbstractSubject->import('c000aa1a-9c61-4...', '/Volumes/Worksp...')
#17 /project/src/vendor/techdivision/import/src/Plugins/SubjectPlugin.php(186): TechDivision\Import\Plugins\SubjectExecutor->execute(Object(TechDivision\Import\Configuration\Jms\Configuration\Subject), Array, 'c000aa1a-9c61-4...', '/Volumes/Worksp...')
#18 /project/src/vendor/techdivision/import/src/Plugins/SubjectPlugin.php(121): TechDivision\Import\Plugins\SubjectPlugin->processSubject(Object(TechDivision\Import\Configuration\Jms\Configuration\Subject))
#19 /project/src/vendor/techdivision/import-app-simple/src/Simple.php(622): TechDivision\Import\Plugins\SubjectPlugin->process()
#20 /project/src/vendor/techdivision/import-cli-simple/src/Command/AbstractImportCommand.php(105): TechDivision\Import\App\Simple->process()
#21 /project/src/vendor/symfony/console/Command/Command.php(245): TechDivision\Import\Cli\Command\AbstractImportCommand->execute(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /project/src/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /project/src/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand(Object(TechDivision\Import\Cli\Command\ImportCategoriesCommand), Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /project/src/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /project/src/vendor/techdivision/import-cli-simple/bootstrap.php(39): Symfony\Component\Console\Application->run(Object(TechDivision\Import\Cli\Console\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /project/src/vendor/techdivision/import-cli-simple/bin/import-simple.php(54): require('/Volumes/Worksp...')
#27 /project/src/vendor/techdivision/import-cli-simple/bin/import-simple(2): require('/Volumes/Worksp...')
#28 {main}