Fixed Latest importer error:

Affected version
1.3.1

MySiteGuy

Formerly ftsservice
Code:
SELECT thread.*,
                                IF(user.username IS NULL, thread.postusername, user.username) AS postusername
                                deletionlog.userid AS deleteuserid,
                                deletionlog.username AS deleteusername,
                                deletionlog.reason AS deletereason,
                                deletionlog.dateline AS deletedate
                        FROM vb_thread AS
                                thread
                        LEFT JOIN vb_user AS
                                user ON (user.userid = thread.postuserid)
                        LEFT JOIN vb_deletionlog AS
                                deletionlog ON (deletionlog.primaryid = thread.threadid AND deletionlog.type = 'thread')
                        INNER JOIN vb_forum AS
                                forum ON (forum.forumid = thread.forumid AND forum.link = '' AND forum.options & 4)
                        WHERE thread.threadid > ? AND thread.threadid <= ?
                        AND thread.open <> 10
                        ORDER BY thread.threadid
                        LIMIT 1000;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'deletionlog.userid AS deleteuserid,
                                deletionlog.' at line 3
 

Brogan

XenForo moderator
Staff member
Editing line 3046 in the vBulletin.php file in src\addons\XFI\Import\Importer should resolve it.

Change:
PHP:
IF(user.username IS NULL, thread.postusername, user.username) AS postusername
To:
PHP:
IF(user.username IS NULL, thread.postusername, user.username) AS postusername,
 

MySiteGuy

Formerly ftsservice
Yeah, I already did this on my end. It was more of a "heads up" message to let you know it was there. :)
 

Brogan

XenForo moderator
Staff member
I figured you had.

I just had a ticket about the same error so thought I would post the fix so I can point anyone else with the same issue to that post so they can resolve it themselves until a new importer release is made.
 

XenArabia

Well-known member
Same Here but after adding the comma as you mentioned above I have this error

PHP:
XF\Db\Exception: MySQL query error [1406]: Data too long for column 'delete_reason' at row 1 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 517
    XF\Import\Data\EntityEmulator->insertStateRecord() in src/XF/Import/Data/AbstractEmulatedData.php at line 85
    XF\Import\Data\AbstractEmulatedData->insertStateRecord() in src/XF/Import/Data/Thread.php at line 85
    XF\Import\Data\Thread->postSave() in src/XF/Import/Data/AbstractData.php at line 136
    XF\Import\Data\AbstractData->save() in src/addons/XFI/Import/Importer/vBulletin.php at line 3028
    XFI\Import\Importer\vBulletin->stepThreads() 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 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 2184
    XF\App->run() in src/XF.php at line 391
    XF::runApp() in admin.php at line 13
 

Brogan

XenForo moderator
Staff member
There is another open bug report for that.

 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XFI release (1.3.2).

Change log:
Add a comma that had gone missing in the posts import query.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top