Fixed Truncated VB field IDs can be duplicated

Cadellin

Member
I deleted the whole database, reinstalled, applied the fix for match_regex and then re-ran the import to get that error. I'm now trying deleting all the files off FTP as well which seems like overkill but you never know.

EDIT:
Confirmed - still happens on a completely clean import using the fix for match_regex above.

I suspect this is because two custom userfields in my vBulletin database have similar names and when truncated they are the same.

After deleting the custom user field "anti_bot_enter_the" from the xf_user_field table and resuming the import I get a new error:

Oops! We ran into some problems.
Phrase titles must be unique in a languag. The specified phrase is already in use.
 
Last edited:
Didn't see your edit - bear in mind no one will get an alert for an edit unless they just so happen to revisit the thread.

That does seem to be a separate bug.
 
Incidentally, is it possible for you to rename this field in vBulletin before starting the import again? That will be a good workaround to ensure it doesn't hold you up any further.
 
I renamed the title of the two profile fields which had similar names (in the vB Admin panel for anyone with future issues) and that fixed the truncating issue.

Now I've got a new issue:

InvalidArgumentException: Attempted to convert NULL to string/binary [description] in src/XF/Import/Data/EntityEmulator.php at line 79
  1. XF\Import\Data\EntityEmulator->set() in src/XF/Import/Data/AbstractEmulatedData.php at line 24
  2. XF\Import\Data\AbstractEmulatedData->set() in src/XF/Import/Data/AbstractData.php at line 70
  3. XF\Import\Data\AbstractData->bulkSet() in src/XF/Import/Importer/vBulletin.php at line 1800
  4. XF\Import\Importer\vBulletin->setupNodeImport() in src/XF/Import/Importer/vBulletin.php at line 1765
  5. XF\Import\Importer\vBulletin->importNodeTree() in src/XF/Import/Importer/vBulletin.php at line 1739
  6. XF\Import\Importer\vBulletin->stepForums() in src/XF/Import/Runner.php at line 161
  7. XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 75
  8. XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 231
  9. XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 249
  10. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 87
  11. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1879
  13. XF\App->run() in src/XF.php at line 328
  14. XF::runApp() in admin.php at line 13
 
I think the fix for your most recent issue might be to find this code:
PHP:
        $importNode->bulkSet([
            'title' => strip_tags($forum['title']),
            'description' => $forum['description'],
            'display_order' => $forum['displayorder'],
and replace it with this:
PHP:
        $importNode->bulkSet([
            'title' => strip_tags($forum['title']),
            'description' => $forum['description'] ?: '',
            'display_order' => $forum['displayorder'],
Please let me know how that goes.
 
That worked!

Unfortunately I now have a new error..

XF\Db\Exception: MySQL query error [1366]: Incorrect integer value: 'status' for column 'prefix_group_id' at row 1 in src/XF/Db/AbstractStatement.php at line 212
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 174
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 69
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 69
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 144
  5. XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 207
  6. XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 34
  7. XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 99
  8. XF\Import\Data\AbstractData->save() in src/XF/Import/Importer/vBulletin.php at line 2193
  9. XF\Import\Importer\vBulletin->stepThreadPrefixes() in src/XF/Import/Runner.php at line 161
  10. XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 75
  11. XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 231
  12. XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 249
  13. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 87
  14. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  15. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1879
  16. XF\App->run() in src/XF.php at line 328
  17. XF::runApp() in admin.php at line 13
 
That worked!

Unfortunately I now have a new error..
Aah yes, that’s a known bug that occurs when you use ‘retain IDs’ - it’s already been fixed though for 2.0.1. If you put in a support ticket with SSH access to your site, I’ll apply the fix for you, unless you’d prefer to wait for 2.0.1 (or you could just start again without retain IDs)
 
Coming from vB I’m used to bugs being open for years these days. Somehow I suspect you do it differently..

If it’s going to be a couple of weeks or so then I can sit tight and wait for the patch rather than waste support time.

If it’s likely to be longer than that then let me know and I’ll drop in a support request.
 
Coming from vB I’m used to bugs being open for years these days. Somehow I suspect you do it differently..

If it’s going to be a couple of weeks or so then I can sit tight and wait for the patch rather than waste support time.

If it’s likely to be longer than that then let me know and I’ll drop in a support request.
I think 2.0.1 will be out in the not too distant future, but if you'd like me to patch your install it's really no bother.
 
Back
Top Bottom