MyBB Community Forums

Full Version: vB 3.8.4 to MyBB 1.6.8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A friend of mine recently became the owner of a medium-large-ish vBulletin forum, and has tasked me with converting it after I convinced him to move to MyBB. I decided in my infinite wisdom to try the conversion process on a backup copy first in case there are problems. Turns out this was a good idea because the merge system chokes on the first user.

Quote:SQL Error:
1366 - Incorrect integer value: '' for column 'import_usergroup' at row 1
Query:
INSERT INTO mybb_users (usergroup,additionalgroups,displaygroup,import_usergroup,import_additionalgroups,import_displaygroup,import_uid,username,password,salt,loginkey,email,regdate,lastactive,lastvisit,website,showsigs,signature,showavatars,timezone,avatardimensions,avatartype,avatar,lastpost,icq,aim,yahoo,msn,hideemail,allownotices,regip,lastip,longregip,longlastip,language,passwordconvert,passwordconverttype,postnum,invisible,birthday,birthdayprivacy,subscriptionmethod,receivepms,receivefrombuddy,pmnotice,pmnotify,showquickreply,ppp,tpp,daysprune,timeformat,dst,buddylist,ignorelist,style,away,awaydate,returndate,referrer,referrals,reputation,timeonline,showcodebuttons,totalpms,unreadpms,pmfolders,notepad,threadmode,showredirect,dateformat,dstcorrection,warningpoints,moderateposts,moderationtime,suspendposting,suspensiontime,suspendsignature,suspendsigtime,coppauser,classicpostbit,loginattempts,failedlogin,usernotes,passwordconvertsalt) VALUES ('2','','2','','','2','1','USERNAME','','','0','USEREMAIL','1109419200','1270134582','1266622440','USERWEBSITE','1','','1','','','','','1266622360','','','','','1','1','','','0','0','','PASSWORDHASH?','vb3','0','0','04-01-0000','all','2','1','0','1','1','1','0','0','0','0','0','','','0','0','0','0','0','0','0','0','1','63','0','1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can','','','1','0','1','0','0','0','0','0','0','0','0','0','0','0','','rVp')

logs folder is empty except the blank index.html

Error anonymized to protect user.

What do I need to do to get this working?
its not grabbing the correct value for the user's usergroup ID (the original group ID from VB)
Any ideas as to why so I can fix it?
So basically unless I go through and hack the hell out of the conversion script and create a broken PoS myself I'm not going to get to convert this site to MyBB?
I'd help, but I don't have the time right now. The merge system is not too hard to follow have you looked at it at all?

on the VB users table, run a query to get the count of the DISTINCT values in the usergroup field. If there are any NULL or empty values you will need to correct that first
In the actual usergroupid field, there are no NULL or empty values. displaygroupid has empty values, but I'd expect it to just pull the usergroupid in that case.

Doing a 'select usergroupid from user where username='name_from_user_in_merge_error';' shows a usergroup of '2' (which exists but I am 75% sure isn't being queried right now anyway) so missing usergroups is not the problem ATM.
the import_usergroup field is set to INTEGER NOT NULL so the merge is trying to put a empty string which is not allowed
I don't understand why it's doing that though, since the DB has all of the values relevant to the queries I've seen, and no conflicts. The only thing I can imagine is that the values are getting overwritten somewhere and I can't find where.
Okay, I'm moving up with the merge. I had to hack in a few bug fixes (which I'll post once I've seen their effects) and delete a few posts that are apparently way too big (the converter locks up and eventually runs out of memory on them) and I still have one apparently blank PM that is in a state of limbo that's choking up the PM conversion, but I'm making progress.

Okay, I've gotten my forum's test conversion done. It's not gonna be fun getting things redone in the real database, but unless the Merge team can fix the bugs in the vB3 converter I'm gonna have to go ahead and do it.

Here are the quick-fixes I applied in the various modules:
User Import fixed by changing Ln50 to '$insert_data['import_usergroup'] = 1;'
User Import fixed by changing Ln84 to '$insert_data['icq'] = 0;'
Forum Permissions fixed by changing Ln84 to '$query = $this->old_db->simple_select("forumpermission", "COUNT(*) as count");'
Private Messages fixed by ADDING Ln80 as '$insert_data['icon'] = 0;'
Posts fixed by changing Ln57 to '$insert_data['edittime'] = 0;'
Attachments fixed by changing ln80 to '$query = $this->old_db->simple_select("attachment", "COUNT(*) as count");'

After deleting the problematic posts from the database (I have no idea why they were problematic, as a couple I looked at were really rather short) I also had to hack a line into the posts module to set the posts-to-convert count to 0 so it would realize it was done.

Key:
Problematic (no banned users anymore)
Facepalm-worthy (did you not test your changes before committing them?)
And now after a bunch of fun between poking at the merge system and prepping the server (and messing up the server, and blaming myself and a MySQL permissions problem when it was CloudFlare doing I don't know what) I am in the process of converting the live forum to MyBB.

There are 302,827 posts left to import and 303 pages left (after running for 10 minutes).