Advertisement:

Author Topic: Converting from YaBB2 RC3  (Read 13921 times)

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Converting from YaBB2 RC3
« on: September 26, 2008, 09:24:13 AM »
Hi, I've got an old forum running YaBB2 RC3 that I'd like to try to upgrade to SMF.

I successfully installed SMF 1.1.6; browsing to index.php serves the right page.

However, I uploaded mf_1-1-6_yabb2_converter.tar.gz, untarred it, and browsed to convert.php... and nothing happened.  I get a blank white screen, no Apache errors, no program-generated errors, no form, no progress meters... nothin' but a blank white screen.

I realize there might be issues converting an RC version of old code, but I was surprised that I wasn't even given an opportunity to enter path/database information for the forum I wanted to convert.

Does this code work?

How best to proceed?

TIA!

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #1 on: September 26, 2008, 11:58:37 AM »
Try the convert.php attached in this post, Common conversion errors.
 
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #2 on: September 26, 2008, 12:08:23 PM »
Thanks for your help.

Ummm... I'm sure this is a dumb question, but... is there actually a convert.php file attached to that post?

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #3 on: September 26, 2008, 01:49:17 PM »
Oops, no there wasn't :P . Thats what I get for trying to do converter support during class :D

Try this topic
http://www.simplemachines.org/community/index.php?topic=140741.0
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #4 on: September 26, 2008, 02:31:46 PM »
Thanks, man.  That popped up the form.

Using this version of convert.php along with the version of yabb2_to_smf.php from converters>download section of the website, the process crapped out thusly:
Code: [Select]
Converting membergroups... Successful.
Converting members... Successful.
Converting settings... Successful.
Converting personal messages... Successful.
Converting boards and categories... Unsuccessful!
This query:
INSERT INTO `forum`.boards
(name, description, countPosts, boardOrder, memberGroups, tempID, tempCatID, membergroups)
VALUES
...<snip>...
Caused the error:
Column 'memberGroups' specified twice
That's got to be a bug, no?

I'd appreciate anybody's help in how to proceed.  I'd really like to get this forum migrated to a SQL backend, and SMF looks like the way to go... but flushing the existing board content isn't an option.

TIA!

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #5 on: September 26, 2008, 03:32:28 PM »
Yes it was a bug. It was trying to use the membergroup column twice. I fixed it using a conditional statement to prevent this.
Try this one:
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #6 on: September 26, 2008, 04:56:45 PM »
Chugging along...
The patch you provided appears to have gotten the boards done.  Now it's blowing up on the "mark read" table:
Code: [Select]
Converting membergroups... Successful.
Converting members... Successful.
Converting settings... Successful.
Converting personal messages... Successful.
Converting boards and categories... Successful.
Converting mark read data... Unsuccessful!
This query:
INSERT INTO `forum`.log_mark_read
(logTime, ID_MEMBER, ID_BOARD)
VALUES
...<snip>...
Caused the error:
Unknown column 'logTime' in 'field list'

Phew!  This seems like a job for an SVN repository.
Appreciate any help; my knowledge of PHP is zero.

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #7 on: September 26, 2008, 10:10:47 PM »
We have a svn repo, it just isn't public. Also some of these scripts are old and didn't get updated until after I took over converters (Jay didn't have much time to keep up on adding files/updating files to the repo). It is ok though. I am making the changes to my source files as we go through so that way it will get fixed next SMF release (and if I have committed the changes).

Open the yabb2_to_smf.php.
Find and remove this line:

Code: [Select]
                $row['logTime'] = $parts[1] != '' ? (int) $parts[1] : (int) trim($parts[2]);
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #8 on: September 27, 2008, 12:45:06 AM »
OK, I patched yabb2_to_smf.php as indicated & it worked.
Now it's blowing up here:
Code: [Select]
Converting membergroups... Successful.
Converting members... Successful.
Converting settings... Successful.
Converting personal messages... Successful.
Converting boards and categories... Successful.
Converting mark read data... Successful.
Converting topics (part 1)... Successful.
Converting topics (part 2)... Successful.
Converting notifications... Successful.
Converting posts (part 1 - this may take some time)... Unsuccessful!
This query:
INSERT INTO `forum`.messages
(ID_TOPIC, ID_BOARD, subject, posterName, posterEmail, posterTime, icon, posterIP, body, smileysEnabled, modifiedTime, modifiedName, temp_filename)
VALUES
...<snip>...
Caused the error:
Duplicate entry '0-0' for key 1
Ummm... compound primary key?

The values being dumped pretty much all look like this:
Code: [Select]
('2', '4', 'Re: Topic', 'member', 'member@domain.com', '1134667302', 'xx', '255.255.255.255', 'Hello World', '1', '0', '', '')Naturally ID_TOPIC and ID_BOARD are the same for each row.

Ummm... maybe the code isn't providing values for the key columns, so getting zero by default?

Thanks, I appreciate the help.

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #9 on: September 28, 2008, 05:30:40 PM »
Go into your database, view the smf_messages table. Click Structure. Down in the bottom left corner is a indexes table. What is the first index it shows?
Having a feeling that index wasn't dropped like it should of.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #10 on: September 28, 2008, 11:41:45 PM »
I don't think i've got installed any PHP tools for DB admin, but i can ssh in.  This what you're after?
Code: [Select]
mysql> use forum
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show index from messages;
+----------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table    | Non_unique | Key_name      | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+----------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| messages |          0 | ID_MEMBER     |            1 | ID_MEMBER   | A         |        NULL |     NULL | NULL   |      | BTREE      |         |
| messages |          0 | ID_MEMBER     |            2 | ID_MSG      | A         |           1 |     NULL | NULL   |      | BTREE      |         |
| messages |          1 | ipIndex       |            1 | posterIP    | A         |        NULL |       15 | NULL   |      | BTREE      |         |
| messages |          1 | ipIndex       |            2 | ID_TOPIC    | A         |        NULL |     NULL | NULL   |      | BTREE      |         |
| messages |          1 | participation |            1 | ID_MEMBER   | A         |        NULL |     NULL | NULL   |      | BTREE      |         |
| messages |          1 | participation |            2 | ID_TOPIC    | A         |        NULL |     NULL | NULL   |      | BTREE      |         |
| messages |          1 | showPosts     |            1 | ID_MEMBER   | A         |        NULL |     NULL | NULL   |      | BTREE      |         |
| messages |          1 | showPosts     |            2 | ID_BOARD    | A         |        NULL |     NULL | NULL   |      | BTREE      |         |
| messages |          1 | ID_TOPIC      |            1 | ID_TOPIC    | A         |        NULL |     NULL | NULL   |      | BTREE      |         |
+----------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
9 rows in set (0.00 sec)

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #11 on: September 28, 2008, 11:43:42 PM »
Incidentally, I've been blowing away the DB & reinstalling SMF from scratch, so that's not likely the source of any problem re: indices not getting dropped.

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #12 on: September 29, 2008, 06:53:09 PM »
Yea that will do.
It looks like the indexes didn't get dropped like they should.

If you do it manually yourself by running the following does it drop the index?
Code: [Select]
ALTER TABLE messages
DROP INDEX ID_MEMBER;

Edit,
Although it appears the converter isn't dropping this index as well. So that most likely is our issue.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #13 on: September 30, 2008, 06:40:17 AM »
I blew away the SMF installation, and its database.
I recreated the database, and reinstalled SMF.
On a clean install, I dropped the ID_MEMBER index from the messages table.
Then I performed the conversion using patched convert.php & yabb2_to_smf.php mentioned in this thread.

The conversion process proceeded further.  Now it dies here:
Code: [Select]
Converting posts (part 1 - this may take some time)... Successful.
Converting posts (part 2)... Unsuccessful!
This query:
ALTER TABLE `forum`.messages
CHANGE COLUMN ID_MSG ID_MSG int(10) unsigned NOT NULL auto_increment PRIMARY KEY;
Caused the error:
Multiple primary key defined

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #14 on: September 30, 2008, 02:09:10 PM »
Does the mysql user you are using have permission to alter tables and add/remove indexes?
It seems like a lot of the problems exist in the fact it can't drop or add the indexes.

If you can upgrade to Yabb 2.2, I did remake the yabb 2.2 converter to not drop or add indexes. I don't know how well it would work on a Yabb 2.0 install though.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #15 on: September 30, 2008, 04:46:13 PM »
Quote
Does the mysql user you are using have permission to alter tables and add/remove indexes?
Yes; I think the permissions aren't the problem here.

Quote
If you can upgrade to Yabb 2.2, I did remake the yabb 2.2 converter to not drop or add indexes.
Maybe I'll try that, since this route isn't working terribly well.

Thanks for the help!

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB2 RC3
« Reply #16 on: October 02, 2008, 06:36:49 PM »
Well let me know how this goes.

One reason I redid the Yabb 2.2 converter is I have noticed lots of alter issues where indexes and columns have not been changed correctly. So the new converter just adds a conversion table that it uses instead of altering stuff.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline trepanne

  • Semi-Newbie
  • *
  • Posts: 26
Re: Converting from YaBB2 RC3
« Reply #17 on: October 04, 2008, 12:07:02 AM »
OK, thanks.  I've done the YaBB upgrade.  I'll start a separate thread here about my failure to convert the upgraded YaBB forum to SMF.