Duplicate XF\Db\Exception: MySQL query error [1406]: Data too long for column 'old_id' at row 1

Affected version
2.1.4

duterte

Member
  • XF\Db\Exception: MySQL query error [1406]: Data too long for column 'old_id' at row 1
  • src/XF/Db/AbstractStatement.php:217
  • Generated by: admin
  • Sep 22, 2019 at 10:43 PM
Stack trace
INSERT INTO import_log_vbulletin5_1 (content_type, old_id, new_id) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE new_id = VALUES(new_id)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1406, '22001')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1406, '22001')
#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 `i...', Array)
#4 src/XF/Import/Log.php(117): XF\Db\AbstractAdapter->insert('import_log_vbul...', Array, false, 'new_id = VALUES...')
#5 src/XF/Import/DataManager.php(116): XF\Import\Log->log('node', 'the-toxic-zone-...', '26')
#6 src/addons/XFI/Import/Importer/vBulletin5.php(531): XF\Import\DataManager->log('node', 'the-toxic-zone-...', 26)
#7 src/addons/XFI/Import/Importer/vBulletin.php(2189): XFI\Import\Importer\vBulletin5->logExtraForumData(Array, 26)
#8 src/addons/XFI/Import/Importer/vBulletin.php(2197): XFI\Import\Importer\vBulletin->importNodeTree(Array, Array, 2, 2)
#9 src/addons/XFI/Import/Importer/vBulletin.php(2110): XFI\Import\Importer\vBulletin->importNodeTree(Array, Array, 1)
#10 src/XF/Import/Runner.php(231): XFI\Import\Importer\vBulletin->stepForums(Object(XF\Import\StepState), Array, 8)
#11 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('forums', Object(XF\Import\StepState), 8)
#12 src/XF/Admin/Controller/Import.php(234): XF\Import\Runner->run()
#13 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#15 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#16 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#18 src/XF.php(390): XF\App->run()
#19 admin.php(13): XF::runApp('XF\\Admin\\App')
#20 {main}
Request state
array(4) {
["url"] => string(21) "/admin.php?import/run"
["referrer"] => string(44) "http://***********/admin.php?import/run"
["_GET"] => array(1) {
["import/run"] => string(0) ""
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "****"
}
}
 

Chris D

XenForo developer
Staff member
This shouldn't be happening on the current version of the importer. Please ensure you're up-to-date and working on a brand new import (not resuming an old one) .
 

duterte

Member
This shouldn't be happening on the current version of the importer. Please ensure you're up-to-date and working on a brand new import (not resuming an old one) .

The version of the Xenforo and importer are the latest. I have tried few times importing from fresh install and same result..
 

Chris D

XenForo developer
Staff member
There's possibly one edge case... what is the full name/urlident of the node/forum in vB5 that starts with the-toxic-zone-? Does it contain any non-standard or emoji characters?
 

Chris D

XenForo developer
Staff member
That still leads me to believe then that somehow you aren't using the latest version of the importers.

If you perform a File health check (Tools > File health check) are there any files with unexpected contents?

In the file src/addons/XFI/Import/Importer/vBulletin5.php can you find the following around line 530?
PHP:
? md5($forum['urlident'])
 

duterte

Member
Yes, that code is present on src/addons/XFI/Import/Importer/vBulletin5.php

All 4,604 checked files are present and correct.

Xenforo 2.1.4
XenForo Importers 1.2.4



I tried again to import and this error happened:
Code:
XF\Db\Exception: MySQL query error [1406]: Data too long for column 'old_id' at row 1 in src/XF/Db/AbstractStatement.php at line 217
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/Log.php at line 117
XF\Import\Log->log() in src/XF/Import/DataManager.php at line 116
XF\Import\DataManager->log() in src/addons/XFI/Import/Importer/vBulletin5.php at line 529
XFI\Import\Importer\vBulletin5->logExtraForumData() in src/addons/XFI/Import/Importer/vBulletin.php at line 2189
XFI\Import\Importer\vBulletin->importNodeTree() in src/addons/XFI/Import/Importer/vBulletin.php at line 2197
XFI\Import\Importer\vBulletin->importNodeTree() in src/addons/XFI/Import/Importer/vBulletin.php at line 2110
XFI\Import\Importer\vBulletin->stepForums() in src/XF/Import/Runner.php at line 231
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 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 244
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
 
Top