• Welcome to Simple Machines Community Forum. Please login or sign up.
September 26, 2021, 03:39:36 AM

News:

SMF 2.0.18 has been released! Please update. Read more.


1.1 Converters

Started by Grudge, June 15, 2005, 04:46:34 PM

Previous topic - Next topic

Grudge

June 15, 2005, 04:46:34 PM Last Edit: November 10, 2005, 10:34:55 PM by Compuart
I've attached the converters for 1.1 here incase they are of use to people. Please bear in mind these are beta versions - so please report any bugs you may find!

To use the new converters, first upload both "convert.php" and the file named "yoursoftware_to_smf.sql" or "yoursoftware_to_smf.php" to the same directory.  This directory can be either the directory of SMF, that of your previous software (in most cases - except XOOPS, where it should be in the same directory as XOOPS), or any other directory you prefer.  Then, access the convert.php file much like you might install.php or upgrade.php:

http://www.example.com/path/to/convert.php

From there, proceed as directed by the converter.

Grudge
I'm only a half geek really...

Miraenda


s9jeremiah

July 04, 2005, 10:37:27 PM #2 Last Edit: July 04, 2005, 10:56:48 PM by s9jeremiah
Thanks Grudge :)

Looks like a couple small bugs in the phpbb sql

/******************************************************************************/
--- Converting boards...
/******************************************************************************/

TRUNCATE {$to_prefix}boards;

---* {$to_prefix}boards
SELECT
forum_id AS ID_BOARD, cat_id AS ID_CAT, forum_order AS boardOrder, forum_last_post_id AS ID_LAST_MSG,
"2" AS memberGroups, forum_name AS name, forum_desc AS description, forum_topics AS numTopics,
CASE auth_read
        WHEN 0
            THEN '-1,0,2'
        WHEN 1
            THEN '0,2'
        WHEN 3
            THEN '2'
[b]        WHEN 5
       ELSE '' END AS memberGroups,[/b]
forum_posts AS numPosts
FROM {$from_prefix}forums;
---*

** no 'THEN' after 'When 5'


---# Do all board permissions...
---{
// Select all boards/forums.
$request = convert_query("
SELECT
CASE auth_post WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_post,
CASE auth_reply WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_reply,
CASE auth_edit WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_edit,
CASE auth_sticky WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_sticky,
CASE auth_announce WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_announce,
CASE auth_delete WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_delete,
CASE auth_vote WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_vote,
CASE auth_pollcreate WHEN 0 THEN '-1,0,2,3' WHEN 1 THEN '0,2,3' WHEN 3 '2,3' ELSE '' END AS auth_pollcreate,
forum_id AS ID_BOARD
FROM {$from_prefix}forums");
while ($row = mysql_fetch_assoc($request))

** after the WHEN 3 there is no THEN statement

and the last one...
Quote
Converting board access... Unsuccessful!
This query:


    INSERT INTO `test_board_-_core`.smf_board_permissions
    (ID_GROUP, ID_BOARD, permission)
    VALUES
    (2, 10, 'make_sticky'),
    (2, 10, 'announce_topic'),
    (2, 10, 'remove_own'),
    (2, 10, 'delete_own'),
    (2, 10, 'poll_post'),
    (2, 10, 'poll_add_own'),
    (3, 10, 'make_sticky'),
    (3, 10, 'announce_topic'),
    (3, 10, 'remove_own'),
    (3, 10, 'delete_own'),
    (3, 10, 'poll_post'),
    (3, 10, 'poll_add_own'),
   (, 10, 'post_new'),
    (, 10, 'mark_notify'),
    (, 10, 'mark_any_notify'),
    (, 10, 'post_reply_any'),
    (, 10, 'modify_own'),
    (, 10, 'poll_vote'),
    (, 10, 'poll_view');


Caused the error:

    You have an error in your SQL syntax near ' 10, 'post_new'),
    (, 10, 'mark_notify'),
    (, 10, 'mark_any_notify'),
    ' at line 17

have not had time to disect this yet..


that is all I see so far :)

[Unknown]

Those were older versions, actually, although there were a few typos as you described in the current version.

Please note that these have not been thoroughly tested, and I would call them alpha versions, not beta versions.  Still, they will not harm in any way the forum you're converting from, and can only break the destination SMF forum.

I've updated the first post with the most recent versions.  All of the files have changed, and more than a couple things were fixed.

-[Unknown]

davo88

phpbb2 to smf 1.1

Just downloaded convert.php and phpbb2 to smf.sql and tried them on a phpbb v2.0.16 conversion.

It produced a long page of output including text from posts. After several sections it says "Successful" and next to some Database query headings it says "skipped". I don't see any error messages.

At the end of the page, it says...

Successful.

Conversion Complete
Congratulations, the conversion has completed sucessfully.

Yet no categories, boards, posts or members appear. Looking in the database via phpMyAdmin, I don't see any phpbb data in the smf tables.

How do we go about debugging this?

VTX

July 05, 2005, 10:21:03 AM #5 Last Edit: July 05, 2005, 11:45:59 AM by VTX
Same problem here. Nothing gets imported into the new smf tables, but I got no real errors, just some 'skipped' messages. After that 'Conversion complete', but nothing in there.
Dutch bike drivers, have a look @ http://www.limburgracingteam.nl

s9jeremiah

running the latest version of the phpbb script I am getting this error after a long line of success outputs.

QuoteDatabase query:

SELECT ID_MEMBER AS latestMember, realName AS latestRealName
FROM `crssi`.smf_members
ORDER BY ID_MEMBER DESC
LIMIT 1


Fatal error: Unsupported operand types in C:\testwebserver\xampp\htdocs\smf\convert.php on line 848

PHP Version 4.3.6
MySQL 4.0.18

I'm digging through it to see what I can find but just a heads up!

zigie

July 05, 2005, 12:22:43 PM #7 Last Edit: July 05, 2005, 12:25:44 PM by zigie
I'm having the same problem on my server:

Apache/1.3.33 (Unix)
PHP/4.3.11

Fatal error: Unsupported operand types in /path/to/smf/convert.php on line 848

This line, I'm guessing:
$row += mysql_fetch_assoc($result);

zigie

There were another two warnings that I missed earlier:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /path/to/smf/convert.php(520) : eval()'d code on line 4
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /path/to/smf/convert.php(520) : eval()'d code on line 5

Just before message:  "Recalculating forum statistics..."

Miraenda

July 05, 2005, 12:56:34 PM #9 Last Edit: July 05, 2005, 12:58:24 PM by Miraenda
I would love to see the phpBB2 to SMF converter working, too.  I was going to try to do a phpBB 2.0.16 forum to 1.1 Beta 3 conversion tonight for a massively large forum in order to ensure I didn't have to do the manual upgrade from 1.0.5 to 1.1 when it switches over instead, but it appears the converter isn't working properly yet.  The forum is for my employer at http://www.lunarforums.com/

I can convert to 1.0.5, but then I will take the heat for the manual conversion to 1.1 series when that happens b/c the main selling point to SMF was the auto upgrades in the Package Manager :D

[Unknown]

Quote from: davo88 on July 05, 2005, 07:38:58 AM
How do we go about debugging this?

Well, I left convert.php in debugging mode... sorry about that.  So you were debugging it ;).  To fix this, download the new convert.php.  You may need to access it with this URL:

convert.php?debug=0

QuoteFatal error: Unsupported operand types in /path/to/smf/convert.php on line 848

Same problem.  Sorry about that.... but I was testing something, and I did mention they were still in testing :P.  That said, if you got no real errors, it means that things were good.

Quote from: zigie on July 05, 2005, 12:41:09 PM
There were another two warnings that I missed earlier:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /path/to/smf/convert.php(520) : eval()'d code on line 4
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /path/to/smf/convert.php(520) : eval()'d code on line 5

Just before message:  "Recalculating forum statistics..."

Same issue.  Again, please download the new convert.php.

-[Unknown]

zigie

I tryed it again with "debug=0" option.
Everything ran fine except group access:
Converting ranks... Successful.
Converting groups... Successful.
Converting members... Successful.
Converting additional member groups... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting poll questions... Successful.
Converting polls options... Successful.
Converting polls options... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board access... Successful.
Converting group access... Unsuccessful!
This query:

    INSERT INTO `forum`.smf_board_permissions
    (ID_GROUP, ID_BOARD, permission)
    VALUES
    (41, 1, 'post_new'),
    (41, 1, 'mark_notify'),
    (41, 1, 'mark_any_notify'),
    (41, 1, 'post_reply_any'),
    (41, 1, 'modify_own'),
    (41, 1, 'remove_own'),
    (41, 1, 'delete_own'),
    (41, 1, 'make_sticky'),
    (41, 1, 'announce_topic'),
    (41, 1, 'poll_post'),
    (41, 1, 'poll_add_own'),
    (41, 1, 'poll_vote'),
    (41, 1, 'poll_view'),
    (41, 1, 'moderate_board'),
    (41, 1, 'remove_any'),
    (41, 1, 'lock_any'),
    (41, 1, 'lock_own'),
    (41, 1, 'merge_any'),
    (41, 1, 'modify_any'),
    (41, 1, 'modify_own'),
    (41, 1, 'move_any'),
    (41, 1, 'poll_add_any'),
    (41, 1, 'poll_edit_any'),
    (41, 1, 'poll_remove_any'),
    (41, 1, 'post_reply_own'),
    (41, 1, 'delete_any'),
    (41, 1, 'report_any'),
    (41, 1, 'send_topic'),
    (41, 1, 'split_any');

Caused the error:

    Duplicate entry '41-1-modify_own' for key 1

It seems OK, though. Few things I've noticed so far:

  • The smilies didn't covert, I assume this option isn't avalable yet.
  • Post count based groups (ranks) are duplicated, i.e. there's two for every rank that I've had in phpBB
  • Total Memebers count is 1 in the info center
  • Number of members in member list is 100, while in the original board is 107

davo88

Same here. Boards, posts, members are there. My error has slightly different numbers in it...

This query:
INSERT INTO `dmn-test1`.smf_board_permissions
(ID_GROUP, ID_BOARD, permission)
VALUES
(9, 25, 'post_new'),
(9, 25, 'mark_notify'),
(9, 25, 'mark_any_notify'),
(9, 25, 'post_reply_any'),
(9, 25, 'modify_own'),
(9, 25, 'remove_own'),
(9, 25, 'delete_own'),
(9, 25, 'make_sticky'),
(9, 25, 'announce_topic'),
(9, 25, 'poll_post'),
(9, 25, 'poll_add_own'),
(9, 25, 'poll_vote'),
(9, 25, 'poll_view'),
(9, 25, 'moderate_board'),
(9, 25, 'remove_any'),
(9, 25, 'lock_any'),
(9, 25, 'lock_own'),
(9, 25, 'merge_any'),
(9, 25, 'modify_any'),
(9, 25, 'modify_own'),
(9, 25, 'move_any'),
(9, 25, 'poll_add_any'),
(9, 25, 'poll_edit_any'),
(9, 25, 'poll_remove_any'),
(9, 25, 'post_reply_own'),
(9, 25, 'delete_any'),
(9, 25, 'report_any'),
(9, 25, 'send_topic'),
(9, 25, 'split_any');
Caused the error:

Duplicate entry '9-25-modify_own' for key 1

[Unknown]

Oh, I see.  This was designed to ignore such errors.  Part of the problem is the old conversion system skipped such things.

I've updated them again.  How do they go now?

-[Unknown]

zigie

Looks much better! No error messages.

The statistics were recalculated properly, so the member count is correct now and latest member appeared (was empty before).
The Ranks are still increasing in number, though, I have 4 of each rank title now :). Could it be because I ran converter several times? I thought it was to overwrite the old data...

Will smilie conversion be added later on? I liked that option in 1.0.x

I'll keep looking for more issues and report back.

[Unknown]

Quote from: zigie on July 05, 2005, 06:30:13 PM
Could it be because I ran converter several times? I thought it was to overwrite the old data...

Unfortunately, yes.  I'll see if I can't improve it to fix that problem.  However, you can just delete the extra groups anyway.

QuoteWill smilie conversion be added later on? I liked that option in 1.0.x

Perhaps... it was only removed for simplicity.

-[Unknown]

davo88

Looks pretty good now. No error messages from the converter - everything successful and complete.

At a quick glance, everything seems to be there. Will have to go through the fine detail but member count matches, post count is only -3 which could be a phpbb issue.

Good work [Unknown] and thank you for your fast fixes.

s9jeremiah

Thanks Guys!!!

Now everything seems to be converting Except 2 forums I am having a problem with. 

These 2 forums appear to have posted the topics until you look a little closer and you can't actually see any of the messages in the forums.
Here is the before of one of the forums:


and here is the after of the same forum.


and the detail of where it does 'pagination' yet has no messages:


The one thing they have in common is that the permissions on both were set in such a way that only mods or admins could post new topics but everyone else could reply.  I can't help but think it is the permissions but I tried to set the permissions of these two forums on the phpbb to the same as the other forums that were successful but they had the same end result here.  Very strange!
Any ideas?

[Unknown]

Try a recount of all forum totals and statistics, and doing a "find and repair all forum errors".

-[Unknown]

s9jeremiah

did that but that is not the actual result I was looking for.  That just removed the message counts..    I don't want rid of the counts, I want the messages associated with those copied over.  I have not found them in any other forum, they just don't seem to be in here?

I'll do another port to try again and see if it works this round.

Advertisement: