XF 2.0 vB 3.8 -> XF 2.0 Importing Error

NSA

Member
Fresh install, tried it twice, same result.

It seems to be running fine until it starts to import the post (385,000 roughly). Then it errors out. The resulting forum has all my user details, but no forums or posts.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 293 bytes) in /src/XF/Db/Mysqli/Statement.php on line 113

#0 src/XF/Import/Importer/vBulletin.php(2675): XF::handlePhpError(8, 'Undefined index...', '/usr/home/nsa14...', 2675, Array)
#1 src/XF/Import/Runner.php(160): XF\Import\Importer\vBulletin->stepFeeds(Object(XF\Import\StepState), Array, 8)
#2 src/XF/Import/Runner.php(74): XF\Import\Runner->runStep('feeds', Object(XF\Import\StepState), 8)
#3 src/XF/Admin/Controller/Import.php(231): XF\Import\Runner->run()
#4 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'run', 'html', Object(XF\Mvc\ParameterBag), 'importData', Object(XF\Admin\Controller\Import), NULL)
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#8 src/XF.php(328): XF\App->run()
#9 admin.php(13): XF::runApp('XF\\Admin\\App')
#10 {main}

Any ideas? I can poke my way around things, but I don't understand SQL very well, or at least not near enough to figure out what is going wrong here.

Otherwise loving the forum software, got my style mostly setup and backed it up :)

Thank you.
 
if you own your server then simply add this to yur php.ini

PHP:
ini_set('memory_limit', '1024M'); // or you could use 1G

if on shared hosting please ask to hosting provider
 
there is another way also available :) download your vb backup to local host . and upgrade on localhost then upload main server it will save your time near me
 
Thank you for the suggestions. I am not sure how to install it on localhost (My PC I'm assuming).

I'm going to try and have my hosting provider up my memory. A wordpress install was reporting 64M of memory earlier! Yeesh.
 
Thank you for the suggestions. I am not sure how to install it on localhost (My PC I'm assuming).

I'm going to try and have my hosting provider up my memory. A wordpress install was reporting 64M of memory earlier! Yeesh.
64MB is tiny. Consider switching to another host if they refuse.
 
I got them to up it to 400M and it got past that part, but eventually errored out with this (any ideas?):

XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '201712' for key 'PRIMARY' in src/XF/Db/AbstractStatement.php at line 212
  1. XF\Db\AbstractStatement->getException() insrc/XF/Db/Mysqli/Statement.php at line 174
  2. XF\Db\Mysqli\Statement->getException() insrc/XF/Db/Mysqli/Statement.php at line 70
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.phpat line 74
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 151
  5. XF\Db\AbstractAdapter->insert() insrc/XF/Import/Data/EntityEmulator.php at line 207
  6. XF\Import\Data\EntityEmulator->insert() insrc/XF/Import/Data/AbstractEmulatedData.php at line 34
  7. XF\Import\Data\AbstractEmulatedData->write() insrc/XF/Import/Data/AbstractData.php at line 126
  8. XF\Import\Data\AbstractData->save() insrc/XF/Import/Importer/vBulletin.php at line 2944
  9. XF\Import\Importer\vBulletin->stepPosts() in src/XF/Import/Runner.phpat line 160
  10. XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 74
  11. XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line231
  12. XF\Admin\Controller\Import->actionRun() insrc/XF/Mvc/Dispatcher.php at line 249
  13. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line89
  14. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line41
  15. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1880
  16. XF\App->run() in src/XF.php at line 328
  17. XF::runApp() in admin.php at line 13

Code:
Stack trace
INSERT  INTO `xf_post` (`post_id`, `thread_id`, `user_id`, `username`, `post_date`, `message`, `ip_id`, `message_state`, `attach_count`, `likes`, `like_users`, `warning_id`, `warning_message`, `position`, `last_edit_date`, `last_edit_user_id`, `edit_count`, `embed_metadata`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(174): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(70): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(74): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(151): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Import/Data/EntityEmulator.php(207): XF\Db\AbstractAdapter->insert('xf_post', Array)
#5 src/XF/Import/Data/AbstractEmulatedData.php(34): XF\Import\Data\EntityEmulator->insert(201712, Object(XF\Db\Mysqli\Adapter))
#6 src/XF/Import/Data/AbstractData.php(126): XF\Import\Data\AbstractEmulatedData->write(201712)
#7 src/XF/Import/Importer/vBulletin.php(2944): XF\Import\Data\AbstractData->save(201712)
#8 src/XF/Import/Runner.php(160): XF\Import\Importer\vBulletin->stepPosts(Object(XF\Import\StepState), Array, 8)
#9 src/XF/Import/Runner.php(74): XF\Import\Runner->runStep('posts', Object(XF\Import\StepState), 8)
#10 src/XF/Admin/Controller/Import.php(231): XF\Import\Runner->run()
#11 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'run', 'html', Object(XF\Mvc\ParameterBag), 'importData', Object(XF\Admin\Controller\Import), NULL)
#13 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#15 src/XF.php(328): XF\App->run()
#16 admin.php(13): XF::runApp('XF\\Admin\\App')
#17 {main}

Is there anything I can do at this point? Or what can I do to make it go through properly next time?
 
I'm not actually sure how that error can really happen, as we have a system that should really prevent it.

You can likely workaround it by using something like phpMyAdmin and going into the xf_post table and finding the record with post_id 201712 and removing it. It should be re-imported when you restart the import.
 
I'm not actually sure how that error can really happen, as we have a system that should really prevent it.

You can likely workaround it by using something like phpMyAdmin and going into the xf_post table and finding the record with post_id 201712 and removing it. It should be re-imported when you restart the import.

Thanks! Lets give that a try... leave it to me to break something that shouldn't be breakable..
 
That got it moving again! How odd.

Ugh 0.11%. It is going so slow.

I set it to go overnight and it must have errored out as soon as I left the PC. Figures. Is there any way to speed up the transfer, or is it wholly dependent on the speed of the servers? (On 18,000 out of 380,000 posts).
 
So it got to 0.44% (progress!) and errored out, this time with post_id 201713. I used the same trick (deleted it via phpMyAdmin) and its moving again.. there must be something with those group of posts that is acting weird?
 
If you can submit a ticket, that would help. We may need to get access to the data to do some testing.

Alternatively, the 2.0 importers are all still considered beta. The other approach is to import into 1.5 and then upgrade.
 
If you can submit a ticket, that would help. We may need to get access to the data to do some testing.

Alternatively, the 2.0 importers are all still considered beta. The other approach is to import into 1.5 and then upgrade.

Sounds good, I'll try and get a ticket opened. Happened again overnight as I tried to finish the import. It's all the same range (201710 this time) of data that is causing the issue. Those posts were all automatically created in the vB forum via a Wordpress bridge some years ago.

Side question, when doing the import via browser, does the browser window need to remain open for it to continue processing?
 
Ugh. This process is a nightmare..

Ended up just deleting all those posts so it'd stop erroring out. Got all the posts moved over.

Now it's a new error.. any ideas?

Code:
InvalidArgumentException: Received invalid UTF-8 for string column [filename] in src/XF/Mvc/Entity/Entity.php at line 685

[LIST=1]
[*]XF\Mvc\Entity\Entity->_castValueToType() insrc/XF/Mvc/Entity/Entity.php at line 572
[*]XF\Mvc\Entity\Entity->set() in src/XF/Service/Attachment/Preparer.phpat line 34
[*]XF\Service\Attachment\Preparer->insertDataFromFile() insrc/XF/Import/Data/Attachment.php at line 62
[*]XF\Import\Data\Attachment->write() insrc/XF/Import/Data/AbstractData.php at line 126
[*]XF\Import\Data\AbstractData->save() insrc/XF/Import/Importer/vBulletin.php at line 3469
[*]XF\Import\Importer\vBulletin->stepAttachments() insrc/XF/Import/Runner.php at line 160
[*]XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 74
[*]XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line231
[*]XF\Admin\Controller\Import->actionRun() insrc/XF/Mvc/Dispatcher.php at line 249
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line89
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line41
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1880
[*]XF\App->run() in src/XF.php at line 328
[*]XF::runApp() in admin.php at line 13
[*]

Stack trace
#0 src/XF/Mvc/Entity/Entity.php(572): XF\Mvc\Entity\Entity->_castValueToType('\xCDndice.jpg', 'filename', 5, Array)
#1 src/XF/Service/Attachment/Preparer.php(34): XF\Mvc\Entity\Entity->set('filename', '\xCDndice.jpg', Array)
#2 src/XF/Import/Data/Attachment.php(62): XF\Service\Attachment\Preparer->insertDataFromFile(Object(XF\FileWrapper), '151', Array)
#3 src/XF/Import/Data/AbstractData.php(126): XF\Import\Data\Attachment->write(9346)
#4 src/XF/Import/Importer/vBulletin.php(3469): XF\Import\Data\AbstractData->save(9346)
#5 src/XF/Import/Runner.php(160): XF\Import\Importer\vBulletin->stepAttachments(Object(XF\Import\StepState), Array, 8)
#6 src/XF/Import/Runner.php(74): XF\Import\Runner->runStep('attachments', Object(XF\Import\StepState), 8)
#7 src/XF/Admin/Controller/Import.php(231): XF\Import\Runner->run()
#8 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'run', 'html', Object(XF\Mvc\ParameterBag), 'importData', Object(XF\Admin\Controller\Import), NULL)
#10 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#12 src/XF.php(328): XF\App->run()
#13 admin.php(13): XF::runApp('XF\\Admin\\App')
#14 {main}

-------------

Previous InvalidArgumentException: Received invalid UTF-8 for string column - src/XF/Mvc/Entity/ValueFormatter.php:100
#0 src/XF/Mvc/Entity/Entity.php(681): XF\Mvc\Entity\ValueFormatter->castValueToType('\xCDndice.jpg', 5, Array)
#1 src/XF/Mvc/Entity/Entity.php(572): XF\Mvc\Entity\Entity->_castValueToType('\xCDndice.jpg', 'filename', 5, Array)
#2 src/XF/Service/Attachment/Preparer.php(34): XF\Mvc\Entity\Entity->set('filename', '\xCDndice.jpg', Array)
#3 src/XF/Import/Data/Attachment.php(62): XF\Service\Attachment\Preparer->insertDataFromFile(Object(XF\FileWrapper), '151', Array)
#4 src/XF/Import/Data/AbstractData.php(126): XF\Import\Data\Attachment->write(9346)
#5 src/XF/Import/Importer/vBulletin.php(3469): XF\Import\Data\AbstractData->save(9346)
#6 src/XF/Import/Runner.php(160): XF\Import\Importer\vBulletin->stepAttachments(Object(XF\Import\StepState), Array, 8)
#7 src/XF/Import/Runner.php(74): XF\Import\Runner->runStep('attachments', Object(XF\Import\StepState), 8)
#8 src/XF/Admin/Controller/Import.php(231): XF\Import\Runner->run()
#9 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'run', 'html', Object(XF\Mvc\ParameterBag), 'importData', Object(XF\Admin\Controller\Import), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}

I tried searching for a "xCDndice.jpg" file on the old system and it's not in the attachments anywhere. The import process got to like 90% of the attachments before it errored out. I don't really care about it getting this file if I can find a way to bypass it and move on.....
 
Last edited:
Okay seemed to fix that one.. the dateline in vB and attach_date values are the same in both databases, so I looked up all the files uploaded on that date and found one that was named like "lidice.jpg" and deleted it. That seemed to stop the error. No idea how/why it was getting screwed up though.
 
Top Bottom