Duplicate vB4 Import Issues

Cadellin

Member
Affected version
2.0
I'm trying to import a vB4 datebase in to XF2.

The first issue I hit was an error InvalidArgumentException: Unknown column 'match_regex' which I fixed with the suggestion here

I dropped all the XF tables, reinstalled, applied the fix and started again but I've now hit a different issue.

Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'anti_bot_enter_the' for key 'PRIMARY' in src/XF/Db/AbstractStatement.php at line 212

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 174
    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 69
    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 69
    XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 144
    XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 207
    XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 34
    XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 99
    XF\Import\Data\AbstractData->save() in src/XF/Import/Importer/vBulletin.php at line 696
    XF\Import\Importer\vBulletin->stepUserFields() in src/XF/Import/Runner.php at line 161
    XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 75
    XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 231
    XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 249
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 87
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1879
    XF\App->run() in src/XF.php at line 328
    XF::runApp() in admin.php at line 13

Any suggestions? I could download XF1.5 but I'm not in an immediate rush as I've got a custom style to create first so I'm happy to be a guinea pig and to work through the issues.
 
The match_regex issue has been resolved for the next release. See following thread for a fix:

https://xenforo.com/community/threads/error-in-step-2-of-importer-cli-for-vb4.137967/

Restarting the importer when you retain IDs will cause such errors which you will need to resolve by removing the already imported records.

Specifically it looks like a custom user field called “anti_bot_enter_the” in the xf_user_field table.

Once it is removed, the import will resume and it will recreate the record.
 
Back
Top Bottom