XF 2.1 Data too long for column "delete_reason" with importer 1.3.2

Christer L

Member
I am using the new 1.3.2 importer to import a vBulletin 3.8 into XenForo 2.1.7
It failed on "Data too long for column" when inserting into xf_deletion_log, on column "delete_reason"
Server is 5.6.43-84.3 - Percona Server

I noticed that XF/Db/Mysqli/Adapter.php forces the database to use STRICT_ALL_TABLES, thus column length limits are enforced
I uncommented this for now, and now the import seems to continue fine.

In a previous test import run I did for the same forum, with importer 1.3.0 I did not encounter this

So is this a bug, or something else?
 
It was also actually fixed in the importer for 1.3.2 but this is the second report we’ve had of it recurring.

Do you have the full stack trace of the error? This should be stored in the Admin control panel Server error log, though it may only get logged if you run the importer through the web interface rather than the CLI.
 
Yes here it is:
Code:
Stack trace
INSERT  INTO `xf_deletion_log` (`content_type`, `content_id`, `delete_date`, `delete_user_id`, `delete_username`, `delete_reason`) VALUES (?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE delete_date = LEAST(delete_date, VALUES(delete_date))
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1406, '22001')
#1 src/XF/Db/Mysqli/Statement.php(78): 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(222): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Import/Data/EntityEmulator.php(517): XF\Db\AbstractAdapter->insert('xf_deletion_log', Array, false, 'delete_date = L...')
#5 src/XF/Import/Data/AbstractEmulatedData.php(85): XF\Import\Data\EntityEmulator->insertStateRecord(Object(XF\Db\Mysqli\Adapter), 'deleted', 1250516466, Array)
#6 src/XF/Import/Data/Thread.php(85): XF\Import\Data\AbstractEmulatedData->insertStateRecord('deleted', 1250516466)
#7 src/XF/Import/Data/AbstractData.php(136): XF\Import\Data\Thread->postSave(111286, 111286)
#8 src/addons/XFI/Import/Importer/vBulletin.php(3028): XF\Import\Data\AbstractData->save(111286)
#9 src/XF/Import/Runner.php(231): XFI\Import\Importer\vBulletin->stepThreads(Object(XF\Import\StepState), Array, 8)
#10 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('threads', Object(XF\Import\StepState), 8)
#11 src/XF/Admin/Controller/Import.php(234): XF\Import\Runner->run()
#12 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(262): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#14 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#15 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#17 src/XF.php(391): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}
Request state
array(4) {
  ["url"] => string(28) "/xforum/admin.php?import/run"
  ["referrer"] => string(53) "https://XXXXXX/xforum/admin.php?import/run"
  ["_GET"] => array(1) {
    ["import/run"] => string(0) ""
  }
  ["_POST"] => array(1) {
    ["_xfToken"] => string(8) "********"
  }
}
 
I know you have worked past this, but we believe our XFI 1.3.2 should be sufficient. 2.1.8 does have an extra component which fixes it at a better location though. There may be one situation where the XFI 1.3.2 fix doesn't work that relates to accented characters, and that might be relevant in your situation.

If you would be attempting the import again, I could send you an updated file with the 2.1.8 fix in it so we can confirm that it fixes the issue properly. (If you're done with the import though, I wouldn't ask you to go through that again.)
 
I know you have worked past this, but we believe our XFI 1.3.2 should be sufficient. 2.1.8 does have an extra component which fixes it at a better location though. There may be one situation where the XFI 1.3.2 fix doesn't work that relates to accented characters, and that might be relevant in your situation.

If you would be attempting the import again, I could send you an updated file with the 2.1.8 fix in it so we can confirm that it fixes the issue properly. (If you're done with the import though, I wouldn't ask you to go through that again.)
Yes we have many usernames with accented characters

I will be running at least one more test import so I can try the fix out, but note that I will also be changing username to collation utf8mb4_bin to avoid getting a lot of our usernames changed ("ä" and "å" is not equal to "a" in Swedish - which the _general_ci collation thinks).

So if the deletion log message that failed is related to this renaming that happened, it will thus not show up again.
 
Top Bottom