• Welcome to Simple Machines Community Forum. Please login or sign up.
September 16, 2021, 11:45:45 AM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


[SMF Converter] IPB 2.3.x

Started by SleePy, May 09, 2008, 10:35:02 PM

Previous topic - Next topic

quercus

Hmm. You may be right, but I have set up a database using SMF 2.0, I suppose I could set one up using SMF 1.1 and upgrade later. Would that be easier? There doesn't seem to be an upgrade from SMF 1.16 to 2.02, the only upgrade I can see is from 2.01 to 2.02.

I have a new error: -
Converting members...Wrong value type sent to the database. Integer expected. (hide_email)

(sorry about this).

ThorstenE

Quote from: quercus on September 03, 2012, 01:42:44 PM
Hmm. You may be right, but I have set up a database using SMF 2.0, I suppose I could set one up using SMF 1.1 and upgrade later. Would that be easier? There doesn't seem to be an upgrade from SMF 1.16 to 2.02, the only upgrade I can see is from 2.01 to 2.02.
You could install SMF1.1 with a different table prefix and use the same database.. Upgrading SMF from 1.1 to 2.0.2 is easy, don't worry.. (http://wiki.simplemachines.org/smf/Upgrading)

But we can fix the converter as well, the errors are related to MySQL beeing in strict mode.. Hopefully we've  found the most ..

in invision23_to_smf.sql find
m.hide_email AS hide_email,
replace it wtih
1 AS hide_email,

quercus

Thanks again.

Here is the latest error:
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics...Wrong value type sent to the database. Integer expected. (id_poll)

ThorstenE

find
---* {$to_prefix}topics 5
replace with
---* {$to_prefix}topics 10
--{
$row['id_poll'] = (int) $row['id_poll'];
--}

quercus

Hmm. That string doesn't appear to exist in the convert.php file.
There is an ---* {$to_prefix}topics 250. Is that what you mean?

ThorstenE

I believe my ipb23_to_sms.sql is different  :o
But yes, that's the related line in your file..
add after
--{
$row['id_poll'] = (int) $row['id_poll'];
--}

quercus

Thanks. A new error:
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Unsuccessful!
This query:

    --{
    $row['id_poll'] = (int) $row['id_poll']
    LIMIT 0, 250;

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 '--{
    $row['id_poll'] = (int) $row['id_poll']
    LIMIT 0, 250' at line 1

ThorstenE

ouch, my mistake..
instead of
--{
$row['id_poll'] = (int) $row['id_poll'];
--}

it needs to be
---{
$row['id_poll'] = (int) $row['id_poll'];
---}

quercus

Thanks.
It got further this time:


Notice: Undefined index: signature in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 71

Notice: Undefined index: signature in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 71

Notice: Undefined index: signature in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 71

Notice: Undefined index: signature in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 71

Notice: Undefined index: signature in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 71
Wrong value type sent to the database. Integer expected. (modified_time)

ThorstenE

mhh, I'm not sure about the undefined index errors.. does it appear while converting posts?

the second one is easy to fix:

find
$row['body'] = preg_replace("~<img .*?bbc_emoticon' alt='(.+?)' />~ie", '\'$1\'', $row['body']);
add after:
$row['modified_time'] = (int) $row['modified_time'];

quercus


ThorstenE

mhh, ok.. would you please attach your modified version pf ipb23_to_smf.sql? my version of ipb23_to_smf.sql seems different..

quercus


ThorstenE

I've fixed the two bugs, please try the attached version..

quercus

Thanks for that. More errors in the conversion I'm afraid.

There were lots of them so I have removed the duplicate entries:

Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options...
Notice: Undefined index: question in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 11

Notice: Undefined index: choice in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 17

Warning: Invalid argument supplied for foreach() in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 17

Notice: Undefined index: question in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 11

Notice: Undefined index: choice in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 17

Warning: Invalid argument supplied for foreach() in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 17

Notice: Use of undefined constant id_poll - assumed 'id_poll' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 31
Notice: Undefined index: question in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 11

Notice: Undefined index: choice in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 17

Warning: Invalid argument supplied for foreach() in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 17
Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting calendar events...Error in convert script - line 560!
Error in convert script - line 561!

Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1
Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1
Wrong value type sent to the database. Date expected. (start_date)

ThorstenE

Ok, I've fixed another two bugs but it's getting more and more complicated, simply because I don't have an IPB 2.3 database in order to test my fixes  :P Hope this version works..

quercus

Hmm. Looks like the same sort of errors again.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting calendar events...Error in convert script - line 560!
Error in convert script - line 561!

Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1

Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1

Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1
Wrong value type sent to the database. Date expected. (start_date)

ThorstenE

Maybe we need to remove some steps from the converter but try this version first...

quercus

Thanks Thorsten. New errors:
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting calendar events...Error in convert script - line 560!
Error in convert script - line 561!

Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1

Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1

Parse error: syntax error, unexpected '{' in /home/hussars/public_html/forums2/convert.php(1254) : eval()'d code on line 1
Wrong value type sent to the database. Date expected. (start_date)

ThorstenE

ok, I've removed the calendar events conversion as well as converting permissions and board permissions. (If permissions are very important for you we can always add it back, later)

please try the attached version  :)

Advertisement: