XF 2.3 Import error: XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'articles-Forum' for key 'node_name_unique' in src/XF/Db/Abstract

Mr Lucky

Well-known member
Can anyone help with this please?

Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'articles-Forum' for key 'node_name_unique' in src/XF/Db/AbstractStatement.php at line 230
    1    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 207
    2    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 83
    3    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
    4    XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 219
    5    XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 336
    6    XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 73
    7    XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 132
    8    XF\Import\Data\AbstractData->save() in src/addons/XFI/Import/Importer/XenForo2.php at line 981
    9    XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 985
    10    XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 953
    11    XFI\Import\Importer\XenForo2->stepNodes() in src/XF/Import/Runner.php at line 244
    12    XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 61
    13    XF\Import\Runner->run() in src/XF/Admin/Controller/ImportController.php at line 247
    14    XF\Admin\Controller\ImportController->actionRun() in src/XF/Mvc/Dispatcher.php at line 362
    15    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
    16    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
    17    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
    18    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2824
    19    XF\App->run() in src/XF.php at line 806
    20    XF::runApp() in admin.php at line 15
 
Solution
This is a duplicate key error during a XenForo-to-XenForo import. The destination database already has a node with node_name = "articles" of type "Forum", and the import is trying to create another with the same URL portion.
This is a duplicate key error during a XenForo-to-XenForo import. The destination database already has a node with node_name = "articles" of type "Forum", and the import is trying to create another with the same URL portion.
 
Solution
This is a duplicate key error during a XenForo-to-XenForo import. The destination database already has a node with node_name = "articles" of type "Forum", and the import is trying to create another with the same URL portion.
Thanks, I’d assumed the import would deal with any duplicates. Eg. As it does with usernames.
 
I spoke too soon. Just finshed a rerun and got this:
Code:
ErrorException: [E_WARNING] Attempt to read property "thread_id" on null in src/XF/ThreadType/QuestionHandler.php at line 498
XF::handlePhpError() in src/XF/ThreadType/QuestionHandler.php at line 498
XF\ThreadType\QuestionHandler->onThreadRebuildCounters() in src/XF/Entity/Thread.php at line 882
XF\Entity\Thread->rebuildCounters() in src/XF/Job/Thread.php at line 37
XF\Job\Thread->rebuildById() in src/XF/Job/AbstractRebuildJob.php at line 42
XF\Job\AbstractRebuildJob->run() in src/XF/Job/Atomic.php at line 40
XF\Job\Atomic->run() in src/XF/Job/Manager.php at line 275
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 205
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 121
XF\Job\Manager->runByIds() in src/XF/Admin/Controller/ToolsController.php at line 146
XF\Admin\Controller\ToolsController->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 362
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2824
XF\App->run() in src/XF.php at line 806
XF::runApp() in admin.php at line 15
 
I did a searching and I found this topic that had the same last error that you just posted. Can you try the suggestion posted by that member there and see if it will help you too?

 
I did a searching and I found this topic that had the same last error that you just posted. Can you try the suggestion posted by that member there and see if it will help you too?

I would try moving threads and rebuild the forum, but I'm not sure (from the error) which forum it is. Where would I find that
 
Back
Top Bottom