XF 2.2 Issue Using Importer to Merge Databases

Brandon K

Active member
Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'raw-Forum' for key 'node_name_unique' in src/XF/Db/AbstractStatement.php at line 228
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 218
XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 327
XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 71
XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 127
XF\Import\Data\AbstractData->save() in src/addons/XFI/Import/Importer/XenForo2.php at line 949
XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 953
XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 921
XFI\Import\Importer\XenForo2->stepNodes() in src/XF/Import/Runner.php at line 242
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2326
XF\App->run() in src/XF.php at line 488
XF::runApp() in admin.php at line 13

I'm trying to merge two 2.2.3 databases through Importers and I'm getting this message on the 9th or so step.

Any help would be greatly appreciated. I've been told @Slavik might be able to help me or anyone that can.
 
It looks like one of the nodes you are trying to import has the same name of an existing node.

You will need to rename one of them.
Thank you. That fixed that issue.

Now I'm getting:

Code:
InvalidArgumentException: Could not find 'allow_poll' in data in src/XF/Import/Importer/AbstractImporter.php at line 237
XF\Import\Importer\AbstractImporter->mapKeys() in src/addons/XFI/Import/Importer/XenForo2.php at line 1001
XFI\Import\Importer\XenForo2->setupNodeForumImport() in src/addons/XFI/Import/Importer/XenForo22.php at line 264
XFI\Import\Importer\XenForo22->setupNodeForumImport() in src/addons/XFI/Import/Importer/XenForo2.php at line 976
XFI\Import\Importer\XenForo2->setupNodeImport() in src/addons/XFI/Import/Importer/XenForo2.php at line 943
XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 953
XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 921
XFI\Import\Importer\XenForo2->stepNodes() in src/XF/Import/Runner.php at line 242
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2326
XF\App->run() in src/XF.php at line 488
XF::runApp() in admin.php at line 13

I love the testing process, but man this importing thing is complicated. :LOL:
 
Code:
InvalidArgumentException: Could not find 'allow_poll' in data in src/XF/Import/Importer/AbstractImporter.php at line 237
XF\Import\Importer\AbstractImporter->mapKeys() in src/addons/XFI/Import/Importer/XenForo2.php at line 1001
XFI\Import\Importer\XenForo2->setupNodeForumImport() in src/addons/XFI/Import/Importer/XenForo22.php at line 264
XFI\Import\Importer\XenForo22->setupNodeForumImport() in src/addons/XFI/Import/Importer/XenForo2.php at line 976
XFI\Import\Importer\XenForo2->setupNodeImport() in src/addons/XFI/Import/Importer/XenForo2.php at line 943
XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 953
XFI\Import\Importer\XenForo2->importNodeTree() in src/addons/XFI/Import/Importer/XenForo2.php at line 921
XFI\Import\Importer\XenForo2->stepNodes() in src/XF/Import/Runner.php at line 242
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2326
XF\App->run() in src/XF.php at line 488
XF::runApp() in admin.php at line 13

I disabled all addons and rebuilt the poll data and I'm still getting this error. Help, please.
 
Some of your XFI files are out of date. I'm not sure if you're seeing any files fail the health check, but you should re-download the latest version of the importers add-on and upload all of the files, overwriting any existing ones.
 
Some of your XFI files are out of date. I'm not sure if you're seeing any files fail the health check, but you should re-download the latest version of the importers add-on and upload all of the files, overwriting any existing ones.
What’s the latest one that works with 2.2.3?
 
I successfully got through the test import thanks to your help, but for some reason I got a new error on what was gonna be the final run:


Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'profile_post-76586-17103' for key 'content_type_id_user_id' in src/XF/Db/AbstractStatement.php at line 228
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 218
XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 327
XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 71
XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 127
XF\Import\Data\AbstractData->save() in src/XF/Import/Importer/XenForoSourceTrait.php at line 542
XFI\Import\Importer\XenForo2->getReactionContentStepStateForContentTypes() in src/addons/XFI/Import/Importer/XenForo21.php at line 144
XFI\Import\Importer\XenForo21->stepReactionContent() in src/XF/Import/Runner.php at line 242
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2326
XF\App->run() in src/XF.php at line 488
XF::runApp() in admin.php at line 13
 
I got through an entire test import without this issue. And on the second import this came up near the end.

I wanna say step 22? After attachments? Help. I'm almost at the end.
 
It looks like a user has two reactions for the same piece content (profile post ID 76586, user ID 17103 on the target installation). This shouldn't ordinarily be possible, so I'm not sure if there's an anomaly with the source data or a bug somewhere. You might try removing the corresponding row from the xf_reaction_content table and continuing with the import.
 
It looks like a user has two reactions for the same piece content (profile post ID 76586, user ID 17103 on the target installation). This shouldn't ordinarily be possible, so I'm not sure if there's an anomaly with the source data or a bug somewhere. You might try removing the corresponding row from the xf_reaction_content table and continuing with the import.
It didn't occur on my test import where I copied the database to test it so it must an anomaly, but I did as you suggested and it continued!

Thank you.
 
Season 7 Reaction GIF by The Office
 
Top Bottom