Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: jvter on October 15, 2014, 06:29:34 AM

Title: Snitz to smf
Post by: jvter on October 15, 2014, 06:29:34 AM
Hi, I'm trying to convert my SNITZ (v3.4.0.2) (MYSQL) database using the tools provided (convert.php and snitz_to_smf.sql).
From the start I get the following error:

Converting...
Converting members... Unsuccessful!
This query:

    CREATE TABLE IF NOT EXISTS `eczm`.smf_convert (
    old_id_topic int(10) unsigned NULL default '0',
    old_id_msg int(10) unsigned NULL default '0',
    msg_date bigint(20) unsigned NULL default '0',
    type varchar(80) NOT NULL default ''
    ) TYPE=MyISAM;

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 'TYPE=MyISAM' at line 6

Anyone an idea what is wrong?
Title: Re: Snitz to smf
Post by: margarett on October 15, 2014, 07:10:09 AM
Hi and welcome to sm.org ;)

Are you using this converter? --> http://download.simplemachines.org/?converters;software=snitz

You need to edit the .sql file and replace
TYPE=MyISAM;
With
ENGINE=MyISAM;

Try that and let us know if further issues appear ;)
Title: Re: Snitz to smf
Post by: jvter on October 15, 2014, 07:23:08 AM
Hi,
Great now it started. :) ...but it ended again with: Converting members...Wrong value type sent to the database. Date expected. (birthdate)
That can be correct, there are no birthdates stored in the snitz database.........
I could put fake dates there, but I don't like that. ;)
Gr.
j
Title: Re: Snitz to smf
Post by: margarett on October 15, 2014, 07:53:28 AM
Yeah, I was affraid that would happen... There are a lot of issues with that converter, as it is very old :(
Well, now it's a great time to fix it, right? :)

Try the attached .sql file ;)

edit: file removed
Title: Re: Snitz to smf
Post by: jvter on October 15, 2014, 08:27:07 AM
Hi,
OK, lets try to make things better ;D

Got the same error when using that file. I see that it is now does a check for a NULL value (IF(ISNULL(M_DOB), '0001-01-01', M_DOB) AS birthdate,). In my database that field is not NULL just empty.
I just delete that part to see it will go on converting. It went on until:

Converting...
Converting members... Successful.
Preparing Conversion (part 1)...Wrong value type sent to the database. Integer expected. (msg_date)


In line 21 that field I see the line:   'msg_date bigint(20) unsigned NULL default '0'', Does that mean there should be the value '0' in that field?

The field 'msg_date'is also mention in line 57 (REPLY_ID AS old_id_msg, 'msg' AS type, R_DATE AS msg_date, TOPIC_ID AS old_id_topic) and in line 67 (TOPIC_ID AS old_id_topic, 'topic' AS type, T_DATE AS msg_date)

Finally I see the field 'msg_date'in line 'msg_date' in line 106 (ALTER TABLE {$to_prefix}convert ORDER BY msg_date;). Lookin into the table 'smf_convert' I see that in all fields of that column are NULL. (so not '0')

The date of the mesage is too important so deleting is not an opting this time :-(

So the first step (ignoring the birthdate) is more or less successful! :-)

gr.
j
Title: Re: Snitz to smf
Post by: margarett on October 15, 2014, 09:05:17 AM
Yeah but we don't want to ignore the birthdate. Let's fix it and try to fix this new error also ;)

Try this file and check please which values (non-integer) you have in forum_reply column R_DATE

edit: removed
Title: Re: Snitz to smf
Post by: jvter on October 15, 2014, 11:07:35 AM
Hi,

Great, No birthdate errors anymore. :)
The fieldtype is  is VARCHAR(14).
I checked all record  with a short asp script (<%=(IsNumeric(Recordset1.Fields.Item("R_DATE").Value))%>. All 14271 times I got the response TRUE, so it are al integers.

gr.
j
Title: Re: Snitz to smf
Post by: margarett on October 15, 2014, 01:05:27 PM
Try again (attachment in previous post ;)
Title: Re: Snitz to smf
Post by: jvter on October 15, 2014, 02:15:44 PM
 :-[ :
Converting members... Successful.
Preparing Conversion (part 1)...Wrong value type sent to the database. Integer expected. (msg_date)

(I just tried to use CAST too without succes )
gr.
j
Title: Re: Snitz to smf
Post by: margarett on October 15, 2014, 02:18:48 PM
Meh :(

Would you allow me to access your current database?
Title: Re: Snitz to smf
Post by: margarett on October 15, 2014, 04:19:32 PM
Your forum has 14(!!!) years? :o Kudos for that.

Looking at the database, the problem is now clear... The date is stored as a varchar with date and time concatenated as a string. Eg: 20141015165829
This value treated as an integer exceeds the value. I guess this wasn't like that when the converter was created :P

Gimme a minute ;)

edit: try this

edit2: removed
Title: Re: Snitz to smf
Post by: jvter on October 15, 2014, 05:15:15 PM
Quote from: margarett on October 15, 2014, 04:19:32 PM
Your forum has 14(!!!) years? :o Kudos for that.

12 years I think :-)  Time to upgrade to someting better  :laugh:

The limit 200 seems to be a problem now:

Converting members... Successful.
Preparing Conversion (part 1)... Unsuccessful!
This query:
LIMIT 200;
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 'LIMIT 200' at line 1

gr.
j
Title: Re: Snitz to smf
Post by: margarett on October 15, 2014, 07:23:41 PM
Ufff this was tough :P

Try both attached files ;)

edit: after conversion, make sure you perform the "Routine" maintenance tasks, especially check for errors and recount totals.
Title: Re: Snitz to smf
Post by: jvter on October 16, 2014, 04:04:45 AM
Hi,
Awesome! No errors anymore  :) :

Converting...
Converting posts ( part 2 - this may take some time)...
Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting censored words... Successful.
Converting moderators... Successful.
Recalculating forum statistics... Successful.
Conversion Complete
Congratulations, the conversion has completed successfully. If you have or had any problems with this converter, or need help using SMF, please feel free to look to us for support.
Please check this box to delete the converter right now for security reasons. (doesn't work on all servers.)

Now that everything is converted over, your SMF installation should have all the posts, boards, and members from the Snitz Forums installation.

We hope you had a smooth transition!


I see no errors in the counters!
Is it correct that all members are able to see all the different forums? So I have to create new member groups and assign the members to the groups?

Gr.
j
Title: Re: Snitz to smf
Post by: margarett on October 16, 2014, 04:19:48 AM
Most likely yes. Board permissions and membergroups aren't converted in most converters :(
Title: Re: Snitz to smf
Post by: jvter on October 16, 2014, 05:53:32 AM
Quote from: margarett on October 16, 2014, 04:19:48 AM
Most likely yes. Board permissions and membergroups aren't converted in most converters :(
No problem, I expected that already, because SNITZ has a somewhat different permission structure.
Next step is to do some intergration.

Thanks for all the help! :D

gr.
j
Title: Re: Snitz to smf
Post by: jclavin on November 30, 2014, 09:28:43 AM
I am having the same problems with birthdate and all that followed in this thread. I am converting Snitz 3.4.07 to SMF 2.0.9. Any chance to get the upgraded conversions? They have been removed from the threads.

Jim
Title: Re: Snitz to smf
Post by: margarett on November 30, 2014, 10:20:24 AM
They were "concentrated" in the files you find 4 posts above yours ;)
Try those
Title: Re: Snitz to smf
Post by: jclavin on December 02, 2014, 06:50:26 PM
Thanks I've downloaded those files but have another issue,

It progresses through to the point where the screen says "Converting posts (part 2 - thisd may take some time)..." and then just hangs. 8+ hours and nothing.
I see the smf_convert table and it has 9,000+  records - the total equal to the topics and replies in snitz.
smf_messages and smf_topics have 642 records each at this point equal to the 642 topics in snitz.
It appears that it is hanging at the processing of replies.

(smf_members seems to me okay so far with matching numbers to snitz.)

Suggestions / help?

Thanks,
Jim

Title: Re: Snitz to smf
Post by: margarett on December 02, 2014, 06:56:01 PM
Maybe your server is really hanging during the process? It's a kinda intense process, really... Yet, if it finished, there's no real reason for that...

If you open the .sql file, you can easily find that conversion part. You can see that there is a "200" in it (IIRC) which means 200 records are converted at a time. Maybe you can lower this value and retry?

I'm sorry, I'm now on the phone so I'm just writing of my head...
Title: Re: Snitz to smf
Post by: jclavin on December 02, 2014, 07:22:30 PM
I set it to 20 and it seems to be working but very slowly - I can see it counting via the "&start=" count in the url line.  "convert.php?step=1&substep=15&start=80"

At the rate it is going it will take about 30 hours to process the 9000 records - seem right?

Jim
Title: Re: Snitz to smf
Post by: margarett on December 03, 2014, 05:31:30 AM
It does. 20 is kinda extreme :P but it can serve the purpose.
The idea is to check whether or not the converter "hangs" at the same point (because it seems it passed the messages conversion already), now doing a much easier job (20 posts at once instead of 200)
Title: Re: Snitz to smf
Post by: thatspeedykid on January 12, 2015, 02:23:25 AM
Sorry for bumping an old topic but, I am getting this error:
Converting members... Unsuccessful!
This query:
CREATE TABLE IF NOT EXISTS `forumnew`.smf_convert (
old_id_topic int(10) unsigned NULL default '0',
old_id_msg int(10) unsigned NULL default '0',
msg_date bigint(20) unsigned NULL default '0',
type varchar(80) NOT NULL default ''
) TYPE=MyISAM;
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 'TYPE=MyISAM' at line 6

So likely i changed the TYPE=MYisam to Engine=MyISAM;

And i get the following errors:

Converting members...
Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2494

Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2495

Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2494

Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2495

Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2494

Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2495

Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2494

Notice: Undefined variable: result in /home/dev1dhc/public_html/forum/convert.php on line 2495

Warning: get_resource_type() expects parameter 1 to be resource, null given in /home/dev1dhc/public_html/forum/convert.php on line 2736

Notice: Undefined index: db_fetch_assoc in /home/dev1dhc/public_html/forum/convert.php on line 2740

Fatal error: Function name must be a string in /home/dev1dhc/public_html/forum/convert.php on line 2740

could you guys help me fix? its for a client of mine that wants to change forums
Title: Re: Snitz to smf
Post by: margarett on January 12, 2015, 04:07:31 AM
Are you using the converter attached to this topic, some posts before yours? (It shouldn't fix the "undefined" errors, though...