- Affected version
- 1.5.0
Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'Spoiler' for key 'PRIMARY' src/XF/Db/AbstractStatement.php:228
Generated by: Unknown account Jul 6, 2021 at 10:51 AM
Stack trace
INSERT INTO `xf_bb_code` (`bb_code_id`, `bb_code_mode`, `has_option`, `replace_html`, `replace_html_email`, `replace_text`, `callback_class`, `callback_method`, `option_regex`, `trim_lines_after`, `plain_children`, `disable_smilies`, `disable_nl2br`, `disable_autolink`, `allow_empty`, `allow_signature`, `editor_icon_type`, `editor_icon_value`, `active`, `addon_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------
#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(221): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Import/Data/EntityEmulator.php(327): XF\Db\AbstractAdapter->insert('xf_bb_code', Array)
#5 src/XF/Import/Data/AbstractEmulatedData.php(71): XF\Import\Data\EntityEmulator->insert(19, Object(XF\Db\Mysqli\Adapter))
#6 src/XF/Import/Data/AbstractData.php(127): XF\Import\Data\AbstractEmulatedData->write(19)
#7 src/addons/XFI/Import/Importer/vBulletin.php(1850): XF\Import\Data\AbstractData->save(19)
#8 src/XF/Import/Runner.php(242): XFI\Import\Importer\vBulletin->stepCustomBbCodes(Object(XF\Import\StepState), Array, 8)
#9 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('customBbCodes', Object(XF\Import\StepState), 8)
#10 src/XF/Import/Runner.php(152): XF\Import\Runner->run()
#11 src/XF/Import/ParallelRunner.php(40): XF\Import\Runner->runUntilCompleteInternal(Object(XF\Import\Manager), Object(Closure))
#12 src/XF/Import/Runner.php(128): XF\Import\ParallelRunner->runUntilCompleteInternal(Object(XF\Import\Manager), Object(Closure))
#13 src/XF/Cli/Command/Import.php(155): XF\Import\Runner->runUntilComplete(Object(XF\Import\Manager), Object(Closure))
#14 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\Import->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 src/vendor/symfony/console/Application.php(992): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\Import), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 src/XF/Cli/Runner.php(109): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 cmd.php(15): XF\Cli\Runner->run()
#20 {main}
This error occured because the source database had
Spoiler
and spoiler
.Normally this should not happen, though I think even if it does happen the importer should not stop with such an error.
Last edited: