Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: mrjamin on August 18, 2020, 06:32:05 AM

Title: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: mrjamin on August 18, 2020, 06:32:05 AM
Hi All,

I'm trying to convert a long due for retirement instance of Snitz to SMF.  The environment is IIS/PHP5.6 and MySQL.  A blank instance of SMF is up and running and the Snitz instance also uses the same MySQL database server and database user.

When I run the converter I instantly get the following error:

Converting members... Unsuccessful!

This query:

CREATE TABLE IF NOT EXISTS `FNET_SMF`.lme_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:
1064


At this point, no new tables or data seems to have been added to the SMF database.  I can't see any NULLs in the Snitz datbase members table, so I'm not sure what would be causing this.  I couldn't find much anywhere else in the SMF forums, so any suggestions would be extremely welcome.


Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: vbgamer45 on August 18, 2020, 08:27:09 AM
Try this sql file
Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: mrjamin on August 18, 2020, 10:42:45 AM
Thanks for the super swift response.

I replaced the SQL file that came with the Snitz-SMF converter with the one you attached.  I no longer get the previous error (and a 'lme_convert' table has now been created in the SMF DB), however the converter stops pretty quickly with the following message:

Converting...
Converting members...Wrong value type sent to the database. Integer expected. (date_registered)


Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: vbgamer45 on August 18, 2020, 10:57:57 AM
Going to be a lot of trial an error
Remove this line from the .sql file for now...
   UNIX_TIMESTAMP(REPLACE(M_DATE, '\0', '')) AS date_registered,
Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: mrjamin on August 27, 2020, 06:06:05 AM
Thanks for the suggestion.  I had to step away from this for a bit, but I tried again with that line removed.  It seems that there's a general problem with how the converter deals with date strings from Snitz. 

After removing the suggested line, the same error appears on the next date-formatted string (last_login), and if that is removed, then on birthdate

With all three of those lines removed, the converter then stops with the following message:

Converting members...Field 'openid_uri' doesn't have a default value

I can't find any reference to that field name in either the SQL file or convert.php
Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: vbgamer45 on August 27, 2020, 08:07:21 AM
openid_uri is a field in SMF i belive smf_members table 
You can change the struture to allow null varaibles.
Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: mrjamin on August 28, 2020, 08:42:49 AM
It looks like the original SMF setup script created several fields in _members which have a default value of NULL, but are also set to disallow NULLs.  Update all of those fields to allow NULL (plus removing any lines related to converting date fields from the .sql file) fixed the problem for members importing.

Of course, nothing is that simple. It now fails on the next stage  :-\

Preparing Conversion (part 1)... Unsuccessful!

This query:
SELECT
REPLY_ID AS old_id_msg, 'msg' AS type, R_DATE AS msg_date, TOPIC_ID AS old_id_topic
FROM `fnetForum`.forum_reply
LIMIT 0, 200;

Caused the error:
1146
Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: vbgamer45 on August 28, 2020, 08:47:34 AM
That's a table not exist error looks like on forum_reply
Title: Re: Snitz to SMF Converter Fails at 'Converting Members' Stage
Post by: Doug Heffernan on January 01, 2022, 01:55:39 PM
Quote from: mrjamin on August 28, 2020, 08:42:49 AMIt looks like the original SMF setup script created several fields in _members which have a default value of NULL, but are also set to disallow NULLs.  Update all of those fields to allow NULL (plus removing any lines related to converting date fields from the .sql file) fixed the problem for members importing.

Of course, nothing is that simple. It now fails on the next stage  :-\

Preparing Conversion (part 1)... Unsuccessful!

This query:
SELECT
REPLY_ID AS old_id_msg, 'msg' AS type, R_DATE AS msg_date, TOPIC_ID AS old_id_topic
FROM `fnetForum`.forum_reply
LIMIT 0, 200;

Caused the error:
1146


Sorry for bumping this up, but as it happens I have converted a snitz forum to Smf for a member here and this error happens because the converter does not recognize the name of the table in small letters. You should change forum_reply to FORUM_REPLY, which is the name of the snitz table.

Hopefully this will help others to who might run into the same issue.