News:

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

Main Menu

Snitz to smf

Started by jvter, October 15, 2014, 06:29:34 AM

Previous topic - Next topic

jvter

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?

margarett

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 ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jvter

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

margarett

#3
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
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jvter

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

margarett

#5
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
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jvter

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

margarett

Try again (attachment in previous post ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jvter

 :-[ :
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

margarett

Meh :(

Would you allow me to access your current database?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

#10
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
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jvter

#11
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

margarett

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.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jvter

#13
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

margarett

Most likely yes. Board permissions and membergroups aren't converted in most converters :(
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jvter

#15
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

jclavin

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

margarett

They were "concentrated" in the files you find 4 posts above yours ;)
Try those
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

jclavin

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


margarett

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...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: