• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

vBulletin 4 Importer

Imported 1,174,265 posts, 59,625 threads and 25,433 users from VB4.0.3. Everything seems OK except i forgot to move attachments and avatars from the file system to the database before the backup/restore/import.

Good job Paul :D

btw... does anybody know if there are any difference in performance having attachments and avatars in the database vs file system?
 
Ok found the problem ( i think)....

The mbstring mb_strlen() on line 3660 of v1.39 (page 34xx of 1.37) has issues with some releases of PHP i believe - php_mbstring can soemtimes not be enabled in some builds. Mine seems to be on, however still doesnt want to play.....

You need to have the php_mbstring module enabled in your php.ini. Some setups have it disabled by default.

If that's not possible, you can try changing mb_strlen() to just strlen() in the file referenced in the error message.

So, i changed the line to read "strlen()" and it seems to be importing ok at the mo...

It's a work around, but it seems to work.
Paul
 
I just love it how the admin from vbulletin.org is helping vbulletin customers convert to xenforo :)
You should make friends with MRGTB, you make a fine pair. ;)

So, i changed the line to read "strlen()" and it seems to be importing ok at the mo...
It's a work around, but it seems to work.
It will have a strange effect on very long utf8 usernames (> 50 chars).
 
I haven't looked at the mb_strlen call in particular Paul, but if the string has already been converted to utf-8, you can call utf8_strlen on it and that will work in all cases. It's part of a library that we include (library/Lgpl/Utf8.php, I believe). It will use mbstring or fall back to home grown stuff if needed.
 
I haven't looked at the mb_strlen call in particular Paul, but if the string has already been converted to utf-8, you can call utf8_strlen on it and that will work in all cases. It's part of a library that we include (library/Lgpl/Utf8.php, I believe). It will use mbstring or fall back to home grown stuff if needed.
Interesting, I'll take a look at that.

Thanks Mike.


JFYI, its used to limit extremely long usernames to 50 chars as this is the XF limit (they can be larger in vB). I hit issues with this on my own tests using my live database.
 
why does the importer says 3.7/3.8? I'm running vb4.0.6
 

Attachments

  • Screen shot 2010-11-24 at 6.54.03 PM.webp
    Screen shot 2010-11-24 at 6.54.03 PM.webp
    10.1 KB · Views: 9
that sounds like your attachments table is somehow incomplete. Could you run this query on your vB4 db through phpmyadmin and see if you get an error?

SELECT attachmentid, attachment.userid, attachment.dateline, filesize,
filedataid, filename, counter, contentid as postid, filedata.userid as fileuserid
FROM attachment
INNER JOIN filedata USING (filedataid)
WHERE attachmentid > 2
AND state = "visible"
AND contenttypeid = 1
ORDER BY attachmentid
LIMIT 10

I'm had the same problem and it solved with this code above.. but now I get;

Server Error

Mysqli prepare error: Unknown column 'postid' in 'field list'
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 467
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 706
  5. Zend_Db_Adapter_Abstract->fetchAll() in XenForo/Importer/vBulletin.php at line 1989
  6. XenForo_Importer_vBulletin->stepAttachments() in XenForo/Importer/Abstract.php at line 77
  7. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 161
  8. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 213
  9. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 156
  10. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 303
  11. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  12. XenForo_FrontController->run() in /home/cogumelo/public_html/community/admin.php at line 13

Thank you!
 
I'm had the same problem and it solved with this code above.. but now I get;

Server Error

Mysqli prepare error: Unknown column 'postid' in 'field list'
  1. Zend_Db_Adapter_Abstract->fetchAll() in XenForo/Importer/vBulletin.php at line 1989
Thank you!

This is the 3.7/3.8 Importer, not the vBulletin 4 importer.

You are not running the correct Importer, hence it crashes.
 
You have to download the vB 4 importer from the first post of this thread, unzip it and upload it to /library/XenForo/Importer. Then vB 4 shows up as an option.

This is the 3.7/3.8 Importer, not the vBulletin 4 importer.

You are not running the correct Importer, hence it crashes.

Oops, sorry I was certain that I had the importer inside the right directory, but I was putting it in/library/XenForo instead of /library/XenForo/Importer

tsc.. tsc.. Thanks guys!
 
Did anyone get this error while trying to import vb CMS articles? I went through the importer codes and saw that it checks to see if it's enabled on vbulletin, so I just turned it off and was able to bypass it. I figured I would post it here though!

Server Error

Mysqli statement execute error : Incorrect string value: '\xE7\xF5es' for column 'title' at row 1
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 292
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 468
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 546
  4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1500
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1489
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1291
  7. XenForo_DataWriter->save() in XenForo/Model/Import.php at line 316
  8. XenForo_Model_Import->_importData() in XenForo/Model/Import.php at line 684
  9. XenForo_Model_Import->importForum() in XenForo/Importer/vBulletin4.php at line 3544
  10. XenForo_Importer_vBulletin4->buildImportForum() in XenForo/Importer/vBulletin4.php at line 3023
  11. XenForo_Importer_vBulletin4->stepArticles() in XenForo/Importer/Abstract.php at line 77
  12. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 161
  13. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 105
  14. XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 303
  15. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  16. XenForo_FrontController->run() in /home/plantas/public_html/community/admin.php at line 13
 
If you weren't running the CMS, then there would be no reason for you to try and import CMS data, you would merely skip it. There is no reason to turn anything off though.
 
If you weren't running the CMS, then there would be no reason for you to try and import CMS data, you would merely skip it. There is no reason to turn anything off though.

I was running the CMS, but I only had old news about my site on the CMS which wasn't really important. The importer did not allow me to continue to the next step without importing the articles when the CMS was active, so I just turned it off and bypassed it.
 
You cannot complete the attachments import until you have run the CMS and Blogs step, as it now imports any attachments for them as well.

The error looks like some kind of utf problem with one of your article section titles.


Edit - actually, it looks like I omitted to run them through the utf8 converter function, so its a bug that needs fixing.
 
Seems to have imported ok - took ages tho - probably because of the 1.5M posts :) .. However...

When i go into Rebuild Caches/Rebuild thread information it comes up with...


Error


Please enter a value for the required field 'username'.



Anyone any ideas?

There's one Registered user (Me) at present, however multiple guests that are non registered..

Cheers
Paul
 
Top Bottom