problem with import from phpBB2
select user_id, group_id from BBoard_users
union
select user_id, group_id from BBoard_user_group where user_pending = 0;
Notice: Unknown column 'group_id' in 'field list' in /home/siriushr/public_html/forum/vanilla2export.php on line 1151
There is no group_id in phpBB2 BBoard_users table ... And looking through the DB table in question BBoard_user_group there are no users that have user_pending field set to anything but zero.
This is the original query.
$Ex->ExportTable('UserRole', 'select user_id, group_id from :_users union select user_id, group_id from :_user_group where user_pending = 0', $UserRole_Map);
So the question is this... Is this gonna work ?
$Ex->ExportTable('UserRole', 'select u.user_id, g.group_id from :_users u join :_user_group ug on ug.user_id = u.user_id right join :_groups g on ug.group_id = g.group_id', $UserRole_Map);
Comments
so to answer my own question. Yeah, it does work, although if you don't have a default group setup in the forum you must manually update each user to add him/her to a Users (or whatever) group.
Banned users do not get transfered.
Banlist does not get transfered.
Same is for PHPBB3 as far as I can see from the code.
Also if the forum tables are not UTF-8 collated, the special characters get scrambled. If you do this patch ...
$CharacterSet = $Ex->GetCharacterSet('users'); if($CharacterSet) $Ex->CharacterSet = $CharacterSet;
You don't get scrambled chars (they get dropped) but you don't see some output (like usernames in the username list).
I suppose it's better to do a mysql dump, then replace all whatever collation with UTF-8 and let the import script encode everything nice and proper.
mysqldump -uuname -ppwd -c -e --default-character-set=utf8 --single-transaction --skip-set-charset --add-drop-database -B db > dump.sql cp dump.sql dump-fixed.sql vim dump-fixed.sql :%s/DEFAULT CHARACTER SET latin1/DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci/ :%s/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/ :wq mysql -uusername -ppassword < dump-fixed.sql
Something like this, borrowed from Moodle
When I fix everything I can to do the transfer properly I'll post a guide to do it here With the fixed source code for the phpbb2 transfer class and mysql commands neccesary to do it.
Thanks for all the extra information. If you can, add as much as you can to the gitHub (bug) list (separate bug report per issue please), so the Vanilla guys can add it to 2.1 if possible.
After an upgrade, don't do things manually, just use SQL to batch move your users to new usergroups (must be a bug report on github please)
They either did that on purpose or you need to look in the code what happened exactly
Bug report on gitHub please
We have a small Wiki documentation project going on at the Vanilla Wiki site, could you please post your guide there.
That would be great, thank you.
Any demo with a
messed up
phpBB database conversion should go smoothly over to Vanilla.There was an error rendering this rich post.
As for the banlist, there even isn't a structure specified for it so I guess it's on purpose. Although they specify "user_banned" field, this doesn't get pulled for phpbb forums although it does for others.
Yeah sure, I'll one up you on that, I'll fork it, fix the stuff in phpbb2 class and submit a pull request
As for wiki, yeah, for sure, when I get to the point where I have a working example, I'll be sure to post it