Resource icon

vBulletin 5 to Xenforo Importer 1.1.414.1

No permission to download
Thank you - a few more questions:

1) I get the following error when importing users (looks like some details on our old forum are empty):
upload_2017-3-23_19-38-52.webp

2) Is this correct? i.e. setting the password always to the same value?
upload_2017-3-23_19-39-37.webp

3) If the email is empty, should we just skip the member?
upload_2017-3-23_19-40-32.webp
 
Changing the password to a random value. I had a couple users that wanted to test stuff. So I had specific passwords set up for them, but a generic password. Users will need to reset their password.
There is no way to decrypt MD5 passwords, that vBulletin 5 uses, so that Xenforo can re-use their password.

You really shouldn't have any blank email users, since you need to have an email to setup. But vBulletin allowed you to create users that had no emails.
I threw in something that would fill it in with a fake email, as Xenforo will not let you create a user without email.
 
According to the error, it seems you have a username that is less than 3 characters. Xenforo by default, won't allow less than 3. You can go to
yourforum.com/forum/admin.php?options/list/usersAndRegistration
Scroll down to the bottom.. User Name Length Limit
You can change them to meet your needs and then set them back after the import.
 
Thanks - some more feedback:
"Uncaught XenForo_Exception: Please enter a name that does not resemble an email address. in /data/www/html/xenforo/library/XenForo/DataWriter.php:1359 Stack trace: #0 /data/www/html/xenforo/library/XenForo/DataWriter.php(1401): XenForo_DataWriter->_haveErrorsPreventSave()"
 
I bloody love seeing more VB to XF things. This'll help me with a few forums. Tiny ones but important to me. :) Thanks.
 
I tried not to exclude any userinfo. I didn't want to just drop users. If you need something that will drop those users that have @ in it.
This will drop any of those users. But I recommend either contacting the user, and or deleting the user on vBulletin site first. It will sort post information better that way.
On line 604 should be

$vb_member_groups = explode(",", $row['membergroupids']);

put so its like below

if( strpos( $row['username'], "@" ) !== false ) {
continue;​
}
$vb_member_groups = explode(",", $row['membergroupids']);​
 
If have added the following after the while statement on 603 - this will skip users with empty email, username less than 3 characters and user-groups which do not exist (if you choose to ignore a custom user group)

Code:
    while ($row = $result->fetch_assoc()){

        // Skip if username looks like email or is email is empty
        if ( empty( $row['email'] ) || strlen ( $row['username'] ) < 3 || strpos( $row['username'], "@" ) !== false )
            continue;

        // Skip if group does not exist
        if ( ! isset( $usergroup_conversion[$row['usergroupid']] ) )
            continue;

        $vb_member_groups = explode(",", $row['membergroupids']);

Currently importing members (19,000)
 
Question: I noticed that "Forums" is empty - the following query produces ZERO results:
Code:
SELECT COUNT(*) AS forum FROM node
            INNER JOIN closure ON node.nodeid = closure.child
            WHERE node.nodeid <> 2 AND closure.parent = (SELECT contenttypeid FROM contenttype WHERE class = 'Thread') AND node.contenttypeid = 29 AND title <> 'vBCms Comments';
 
Things to check,
What version of VB5 are you running? Is it a 5.1.X? If not upgrade to 5.2.5 Don't do 5.2.6. I've not tested this with that.
Check in channel manager that channel id 2 is Forum. Home should be Channel id 1.
Also make sure your connecting to your vBulletin5 DB. It will search the first db it can find with the table node.
 
Good day Necrophyte, I'm delighted to see that someone has taken on this conversion project. I know I'm not alone in feeling trapped in my vB5 forum, so this is a welcome light at the end of the tunnel. I unfortunately came across this tool after having 'upgraded' to 5.2.6 so I don't know if it will work for me or not, but I'm happy to be a guinea pig for testing.

So far I pass the database checks and get to the initial page, but not without a couple of lines of errors at the top (also in attached screenshot):

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/warbar/dev.warbarron.com/rok/convert_vb5_xen1512.php:2) in /home/warbar/dev.warbarron.com/rok/convert_vb5_xen1512.php on line 4

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/warbar/dev.warbarron.com/rok/convert_vb5_xen1512.php:2) in /home/warbar/dev.warbarron.com/rok/convert_vb5_xen1512.php on line 4

If I try to continue by clicking on 'convert' at that point, the file path is still erroneously set to the default 'forum' path, so it fails. I'm sure I could insert the actual path to proceed, but suspect that there would only be some other issues after that.

I'm not sure if this is a result of me having configured something improperly, but at least so far as I can tell it's correct, and the conversion table is being created in the XF database. One thing that occurs to me is that this might be due to the fact that I'm performing the test on a development sub-domain, rather than my main domain. To illustrate:

Location of current vBulletin 5 installation: www.warbarron.com/rok
Location of testing Xenforo installation: dev.warbarron.com/rok

If that's something that can throw things off let me know...I can do it all from my main domain if necessary, just would prefer not to. And thanks again for your efforts!
 

Attachments

  • ss1.webp
    ss1.webp
    80.9 KB · Views: 2
This is just a warning, Did you put anything above the //Start Config Section?
As for the conversion. The only reason you need the VB5 files section, is to move files from attachments, and the icons/smilies.
BBCode, members, Forums, threads, posts, usergroups etc. all don't need the forums themselves, just access to the database which I can see it has from the image posted..
I'm not sure how you have your domain setup from accessing your server, or even if dev. is on the same server as www. But If you copy the forum file structure from www. to the dev. it will work. You can leave the database exactly where it is.
I named my xenforo forums as forum, and changed the vb5 forum on my dev to be forum_vb5 So I had root/html/forum and root/html/forum_vb5 on same server.
 
No, nothing above the //Start section. I did move over a copy of the vB5 folder structure to make things easier. Still getting the same two errors on every page, and the convert buttons are still reverting to 'forum' rather than the correct folder name in the config file.

Not sure what the malfunction is, but I think I'll wipe my dev server and start again, as it doesn't take long to reinstall XF. I'll use your default structure to eliminate that as a failure point and see where we go from there.
 
I'm not sure what you mean by the convert buttons keep referring to 'forum'. Ahh. I see what it is, and what the issue is. Give me a sec, and I'll update.
 
Definitely making progress, Necrophyte. With that update I no longer have the error messages at the top of the page. However, when running the username conversions I've discovered another bug. The first batch processes fine, but when it tries to advance to the 2nd batch, the path to the file isn't being entered correctly.

What it enters: http://dev.warbarron.comconvert_vb5_xen1512.php/?member&qty=250&start=250&total=1460
What it should enter: http://dev.warbarron.com/rok/convert_vb5_xen1512.php/?member&qty=250&start=250&total=1460

I can get around it by manually entering the correct address, so I'm working on user imports right now. Something to fix in another update.
 
For you specific example. If you open the php file, and search for convert_vb5 and replace all with /rok/convert_vb5 you will get the desired affect.
 
Top Bottom