Simple Machines Community Forum

SMF Support => Converting to SMF => phpBB => Topic started by: flussaudio on August 12, 2019, 10:00:47 PM

Title: New User, First Post
Post by: flussaudio on August 12, 2019, 10:00:47 PM
Howdy, folks.  Installed phpBB a couple days ago, and found it to be too anemic and less than intuitive.  I read through the conversion guide, but needed to ask a quick question before I pull the trigger.

I understand SMF has to be installed before the conversion process begins.  I don't want to take my present forum offline until I know everything has converted properly, so my plan is to install SMF in a temporary directory, test to be sure everything works, delete the current phpBB install, then relocate SMF to the '.../foum' directory where phpBB presently resides, replacing it.

However, I"m guessing that doing so will wreak havoc on relative and absolute paths.  Is there an easy way to fix this?

Thanks in advance!
Title: Re: New User, First Post
Post by: vbgamer45 on August 12, 2019, 10:07:08 PM
There is a repair settings tool
What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
Title: Re: New User, First Post
Post by: flussaudio on August 13, 2019, 07:10:55 PM
Quote from: vbgamer45 on August 12, 2019, 10:07:08 PM
There is a repair settings tool
What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
Thanks for this.

So, close but no cigar.

Installed SMF 2.1RC2 (figured I'd save myself a step by jumping to the next release now)
Installed the 'convert.php' file
Ran the conversion tool
Everything reported back fine - no errors
Logged in to SMF, and no content was brought in to SMF.  Nothing.  No users, no categories, no posts.

I'm guessing I went wrong by jumping to 2.1 right away?

Title: Re: New User, First Post
Post by: vbgamer45 on August 13, 2019, 08:16:37 PM
Yeah I would go to SMF 2.0.x first. Convert then upgrade to SMF 2.1
Get convertor from https://github.com/SimpleMachines/converters
Title: Re: New User, First Post
Post by: flussaudio on August 13, 2019, 08:44:51 PM
Quote from: vbgamer45 on August 13, 2019, 08:16:37 PM
Yeah I would go to SMF 2.0.x first. Convert then upgrade to SMF 2.1
Get convertor from https://github.com/SimpleMachines/converters
Ok, so I started from scratch.  Dumped tables, purged files in directory, extracted 2.0.15, installed board, extracted convert.php, ran script, getting  "Unknown system variable 'SQL_MAX_JOIN_SIZE" error.

Then, tried script from GitHub, got this:

Converting ranks... Successful.
Converting groups... Successful.
Converting members... Unsuccessful!
This query:

    SELECT
    u.user_id AS id_member, SUBSTRING(u.username, 1, 80) AS member_name,
    SUBSTRING(u.username, 1, 255) AS real_name,
    SUBSTRING(u.user_password, 1, 64) AS passwd, u.user_lastvisit AS last_login,
    u.user_regdate AS date_registered,
    SUBSTRING(u.user_from, 1, 255) AS location,
    u.user_posts AS posts, IF(u.user_rank = 1, 1, IFNULL(mg.id_group, 0)) AS id_group,
    u.user_new_privmsg AS instant_messages,
    SUBSTRING(u.user_email, 1, 255) AS email_address,
    u.user_unread_privmsg AS unread_messages,
    SUBSTRING(u.user_msnm, 1, 255) AS msn,
    SUBSTRING(u.user_aim, 1, 16) AS aim,
    SUBSTRING(u.user_icq, 1, 255) AS icq,
    SUBSTRING(u.user_yim, 1, 32) AS yim,
    SUBSTRING(u.user_website, 1, 255) AS website_title,
    SUBSTRING(u.user_website, 1, 255) AS website_url,
    u.user_allow_viewonline AS show_online, u.user_timezone AS time_offset,
    IF(u.user_allow_viewemail = 1, 0, 1) AS hide_email, u.user_avatar AS avatar,
    REPLACE(u.user_sig, '\n', '<br />') AS signature,
    u.user_sig_bbcode_uid AS signature_uid, u.user_avatar_type,
    u.user_notify_pm AS pm_email_notify,
    CASE u.user_inactive_reason WHEN 0 THEN 1 ELSE 0 END AS is_activated,
    '' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
    '' AS personal_text, '' AS time_format, '' AS usertitle, u.user_ip AS member_ip,
    '' AS secret_question, '' AS secret_answer, '' AS validation_code,
    '' AS additional_groups, '' AS smiley_set, '' AS password_salt,
    u.user_ip AS member_ip2
    FROM `********`.phpbb_users AS u
    LEFT JOIN `********`.phpbb_ranks AS r ON (r.rank_id = u.user_rank AND r.rank_special = 1)
    LEFT JOIN `********`.smf_membergroups AS mg ON (mg.group_name = CONCAT('phpBB ', r.rank_title))
    WHERE u.group_id NOT IN (1, 6)
    GROUP BY u.user_id
    LIMIT 0, 500;

Caused the error:

    Unknown column 'u.user_from' in 'field list'
Title: Re: New User, First Post
Post by: vbgamer45 on August 13, 2019, 09:57:19 PM
Take out this line from .sql file from the members query

  SUBSTRING(u.user_from, 1, 255) AS location,
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 09:57:36 AM
Quote from: vbgamer45 on August 13, 2019, 09:57:19 PM
Take out this line from .sql file from the members query

  SUBSTRING(u.user_from, 1, 255) AS location,

Now I'm getting:
Unknown column 'u.user_msnm' in 'field list'
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 10:07:06 AM
Take out these lines as well

    SUBSTRING(u.user_msnm, 1, 255) AS msn,
    SUBSTRING(u.user_aim, 1, 16) AS aim,
    SUBSTRING(u.user_icq, 1, 255) AS icq,
    SUBSTRING(u.user_yim, 1, 32) AS yim,
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 10:19:34 AM
And now, this:
Unknown column 'u.user_website' in 'field list'

Is there perhaps another way to do this that might work?  The source forum (phpBB) is very small, with only four users and perhaps six threads of about 3 posts each, with some attachments.  Instead of tryhing to convert phpBB to SMF, is it possible to bring content, categories, users and permissions only?
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 10:33:01 AM
Keep removing fields until works so remove

    SUBSTRING(u.user_website, 1, 255) AS website_title,
    SUBSTRING(u.user_website, 1, 255) AS website_url,
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 10:56:52 AM
At the rate we're going, there won't be anything left...
Unknown column 'f.forum_posts' in 'field list'

Please understand I'm hesitant to remove (or add) anyting without the guidance of someone who actually knows what he's doing.   ;D
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 11:54:29 AM
The members table is more unique as most profile fields have been removed from that table from a lot of forum systems.

f.forum_posts sounds like you made it past converting members?
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 12:24:04 PM
Quote from: vbgamer45 on August 14, 2019, 11:54:29 AM
The members table is more unique as most profile fields have been removed from that table from a lot of forum systems.

f.forum_posts sounds like you made it past converting members?
So it seems.  I have members, and one 'category came in, but no forums or posts.
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 12:41:33 PM
What's complete error message like what step?
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 01:32:50 PM
Quote from: vbgamer45 on August 14, 2019, 12:41:33 PM
What's complete error message like what step?

Converting...
Converting members...
Successful.
Converting additional member groups... Successful.
Preparing for categories conversion... Successful.
Converting categories... Successful.
Converting boards... Unsuccessful!
This query:

    SELECT
    f.forum_id AS id_board, CASE WHEN f.parent_id = c.temp_id THEN 0 ELSE f.parent_id END AS id_parent, f.left_id AS board_order, f.forum_posts AS num_posts,
    f.forum_last_post_id AS id_last_msg, SUBSTRING(f.forum_name, 1, 255) AS name, c.id_cat AS id_cat, '-1,0' AS member_groups,
    SUBSTRING(f.forum_desc, 1, 65534) AS description, f.forum_topics AS num_topics, f.forum_last_post_id AS id_last_msg
    FROM `********`.phpbb_forums AS f
    LEFT JOIN `********`.smf_categories AS c ON (c.temp_id = f.parent_id)
    WHERE forum_type = 1
    GROUP BY id_board
    LIMIT 0, 500;

Caused the error:

    Unknown column 'f.forum_posts' in 'field list'
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 01:37:23 PM
Change

f.forum_id AS id_board, CASE WHEN f.parent_id = c.temp_id THEN 0 ELSE f.parent_id END AS id_parent, f.left_id AS board_order, f.forum_posts AS num_posts,
    f.forum_last_post_id AS id_last_msg, SUBSTRING(f.forum_name, 1, 255) AS name, c.id_cat AS id_cat, '-1,0' AS member_groups,
    SUBSTRING(f.forum_desc, 1, 65534) AS description, f.forum_topics AS num_topics, f.forum_last_post_id AS id_last_msg

To

f.forum_id AS id_board, CASE WHEN f.parent_id = c.temp_id THEN 0 ELSE f.parent_id END AS id_parent, f.left_id AS board_order, f.forum_posts_approved AS num_posts,
    f.forum_last_post_id AS id_last_msg, SUBSTRING(f.forum_name, 1, 255) AS name, c.id_cat AS id_cat, '-1,0' AS member_groups,
    SUBSTRING(f.forum_desc, 1, 65534) AS description, fforum_topics_approved AS num_topics, f.forum_last_post_id AS id_last_msg
 

Once you get all working please post the final.sql file here.
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 01:41:59 PM
Quote from: vbgamer45 on August 14, 2019, 01:37:23 PMOnce you get all working please post the final.sql file here.
Most certainly.  ;-)

(https://proxy.duckduckgo.com/iu/?u=http%3A%2F%2Fi.ytimg.com%2Fvi%2F58xsiTeMLGs%2Fhqdefault.jpg&f=1)
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 01:54:54 PM
QuoteUnknown column 'fforum_topics_approved' in 'field list'

Why do I get the feeling this just isn't quite baked, yet?  So, is it safe to keep re-running the same script until we get it right, or should I start again each time with a new, fresh install of SMF?

Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 02:02:35 PM
The convertors for phpBB have not been updated for phpb 3.2.x we are basically writing the code now as we go.
Change to this instead

f.forum_id AS id_board, CASE WHEN f.parent_id = c.temp_id THEN 0 ELSE f.parent_id END AS id_parent, f.left_id AS board_order, f.forum_posts_approved AS num_posts,
    f.forum_last_post_id AS id_last_msg, SUBSTRING(f.forum_name, 1, 255) AS name, c.id_cat AS id_cat, '-1,0' AS member_groups,
    SUBSTRING(f.forum_desc, 1, 65534) AS description, f.forum_topics_approved AS num_topics, f.forum_last_post_id AS id_last_msg
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 02:05:38 PM
Quote from: vbgamer45 on August 14, 2019, 02:02:35 PM
The convertors for phpBB have not been updated for phpb 3.2.x we are basically writing the code now as we go.

Unknown column 't.topic_replies' in 'field list'

If (when?) we finally get this working, I'm going to reinstall SMF and run it 'clean' again to be sure.  Not even positive I've got all the amendments right, at this point.
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 02:21:31 PM
Post the whole error message that is different than the forums table it looks like.
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 02:24:09 PM
Roger that.

Converting ranks... Successful.
Converting groups... Successful.
Converting members... Successful.
Converting additional member groups... Successful.
Preparing for categories conversion... Successful.
Converting categories... Successful.
Converting boards... Successful.
Fixing categories... Successful.
Converting topics... Unsuccessful!
This query:

    SELECT
    t.topic_id AS id_topic, t.forum_id AS id_board, t.topic_first_post_id AS id_first_msg,
    CASE t.topic_type WHEN 1 THEN 1 WHEN 2 THEN 1 ELSE 0 END AS is_sticky,
    t.topic_last_post_id AS id_last_msg, t.topic_poster AS id_member_started,
    t.topic_last_poster_id AS id_member_updated, po.topic_id AS id_poll,
    t.topic_replies AS num_replies, t.topic_views AS num_views,
    CASE t.topic_status WHEN 1 THEN 1 ELSE 0 END AS locked
    FROM `********`.phpbb_topics AS t
    LEFT JOIN `********`.phpbb_poll_options AS po ON (po.topic_id = t.topic_id)
    LIMIT 0, 500;

Caused the error:

    Unknown column 't.topic_replies' in 'field list'
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 02:36:41 PM
Change

t.topic_id AS id_topic, t.forum_id AS id_board, t.topic_first_post_id AS id_first_msg,
    CASE t.topic_type WHEN 1 THEN 1 WHEN 2 THEN 1 ELSE 0 END AS is_sticky,
    t.topic_last_post_id AS id_last_msg, t.topic_poster AS id_member_started,
    t.topic_last_poster_id AS id_member_updated, po.topic_id AS id_poll,
    t.topic_replies AS num_replies, t.topic_views AS num_views,
    CASE t.topic_status WHEN 1 THEN 1 ELSE 0 END AS locked

To

t.topic_id AS id_topic, t.forum_id AS id_board, t.topic_first_post_id AS id_first_msg,
    CASE t.topic_type WHEN 1 THEN 1 WHEN 2 THEN 1 ELSE 0 END AS is_sticky,
    t.topic_last_post_id AS id_last_msg, t.topic_poster AS id_member_started,
    t.topic_last_poster_id AS id_member_updated, po.topic_id AS id_poll,
    t.topic_posts_approved  AS num_replies, t.topic_views AS num_views,
    CASE t.topic_status WHEN 1 THEN 1 ELSE 0 END AS locked
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 03:56:58 PM
Converting topics...
Unsuccessful!
This query:

    SELECT
    t.topic_id AS id_topic, t.forum_id AS id_board, t.topic_first_post_id AS id_first_msg,
    CASE t.topic_type WHEN 1 THEN 1 WHEN 2 THEN 1 ELSE 0 END AS is_sticky,
    t.topic_last_post_id AS id_last_msg, t.topic_poster AS id_member_started,
    t.topic_last_poster_id AS id_member_updated, po.topic_id AS id_poll,
    t.topic_posts_approved AS num_replies, t.topic_views AS num_views,
    CASE t.topic_status WHEN 1 THEN 1 ELSE 0 END AS locked
    LEFT JOIN `********`.phpbb_poll_options AS po ON (po.topic_id = t.topic_id)
    LIMIT 0, 500;

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN `********`.phpbb_poll_options AS po ON (po.topic_id = t.top' at line 8


At this point, I am going to reinstall a fresh copy of SMF and make the edits all over again from scratch.  Stand by... I need to clear a few things off my desk before I can turn my attention to this.  Give me an hour or so...

Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 04:10:37 PM
It looks like this part disappeared from your statement
FROM `********`.phpbb_topics AS t
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 04:11:54 PM
Yes, I masked the db and domain information for security reasons, as I have with all my prior posts.
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 04:13:46 PM
I meant the query you deleted too much it was just left with
CASE t.topic_status WHEN 1 THEN 1 ELSE 0 END AS locked
    LEFT JOIN `********`.phpbb_poll_options AS po ON (po.topic_id = t.topic_id)

Which was missing the FROM `********`.phpbb_topics AS t which was in the original query
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 04:37:35 PM
Converting ranks... Successful.
Converting groups... Successful.
Converting members... Successful.
Converting additional member groups... Successful.
Preparing for categories conversion... Successful.
Converting categories... Successful.
Converting boards... Unsuccessful!
This query:

    SELECT
    f.forum_id AS id_board, CASE WHEN f.parent_id = c.temp_id THEN 0 ELSE f.parent_id END AS id_parent, f.left_id AS board_order, f.forum_posts_approved AS num_posts,
    f.forum_last_post_id AS id_last_msg, SUBSTRING(f.forum_name, 1, 255) AS name, c.id_cat AS id_cat, '-1,0' AS member_groups,
    SUBSTRING(f.forum_desc, 1, 65534) AS description, f.forum_topics_approved AS num_topics, f.forum_last_post_id AS id_last_msg
    LEFT JOIN `********`.smf_categories AS c ON (c.temp_id = f.parent_id)
    WHERE forum_type = 1
    GROUP BY id_board
    LIMIT 0, 500;

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN `********`.smf_categories AS c ON (c.temp_id = f.parent_id)
    WHER' at line 5
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 04:40:14 PM
You are still missing FROM `********`.phpbb_topics AS t   before the left join. Not sure why WHERE forum_type = 1 was added..
If you need help attach your .sql file here.
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 05:55:48 PM
Here 'ya go...
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 06:30:45 PM
Updated file attached
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 07:03:03 PM
Quote from: vbgamer45 on August 14, 2019, 06:30:45 PM
Updated file attached
BOOM.  Needs a bit of work on some items, but users and posts are there.  A few oddities like strikethrough on prior quotes and URLs  where they've been replaced by SMF's graphical style, and this little oddity with the forum name at top left where it says: FL�SS Audio where it should say 'FLÜSS Audio'.  I'm guessing it's a code page / character set thing, but that's also above my pay grade.  Is there a way to fix that?

THANKS!
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 07:14:48 PM
UTF8 site needs to be enabled on utf8/installed with utf8 as the character set and that should help.
Title: Re: New User, First Post
Post by: flussaudio on August 14, 2019, 07:23:09 PM
And he strikethroughs?

Also, how would we make a section (or 'category') hidden?  In phpBB, I could apply permissions to the category, and subforums would inherit those settings.  Can't seem to find that here.
Title: Re: New User, First Post
Post by: vbgamer45 on August 14, 2019, 08:06:58 PM
Strikethoughs you will have to look in the database for the message and see what is wrong.
You might just have to do a find and replace on all the strike though tags though sql.

For category permissions/boards I would post in the general support forums they would know more about that than I.
Title: Re: New User, First Post
Post by: flussaudio on August 15, 2019, 09:11:29 AM
Just wanted to report back as a reference for others who may also be looking to convert from phpBB to SMF.

The amended script provided by vbgamer45 worked perfectly.  There were some anomalies along the way, however.  In the case of my board, some language (character set) issues threw me off, and strikethroughs appear in some posts.  Here was my solution:

Wiped clean, installed 2.0.15 fresh twice to confirm, once each way:
  - Selecting UTF8 causes the "?" symbol to appear
  - NOT selecting UTF8 displays correct umlaut (Ü) in header
Using the latter (not UTF8) and converting with UTF8 preserves the correct formatting.
User categories are not the same, but were marked with a 'phpBB' prefix to separate them from the SMF user categories.
Looks like passwords were not properly converted, but the 'recover' function to reset works properly.

Since the original phpBB install was new, there are only a dozen posts in total.  I'll just edit each manually to remove the strikethroughs.

Thanks!