Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: mostym on February 17, 2010, 10:18:02 PM

Title: e107 0.7.16 to SMF 1.1
Post by: mostym on February 17, 2010, 10:18:02 PM
Hi, I love your forums, but im having some with issues with my conversion.  Any help would be appreciated.

Converting...
Converting members... Successful.
Converting additional member groups...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 13

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 37
Successful.
Converting categories... Successful.
Converting boards... Unsuccessful!
This query:
SELECT
DISTINCT f.forum_id AS ID_BOARD, SUBSTRING(f.forum_name, 1, 255) AS name,
SUBSTRING(f.forum_description, 1, 65534) AS description,
CASE
WHEN f.forum_parent > 500
THEN f.forum_parent - 499
ELSE f.forum_parent
END AS ID_CAT, f.forum_sub AS ID_PARENT,
CASE WHEN f.forum_sub = 0 THEN 0 ELSE 1 END AS childLevel, f.forum_threads AS numTopics,
f.forum_threads + f.forum_replies AS numPosts, f.forum_order AS boardOrder,
CASE f.forum_class
WHEN 252 THEN '-1'
WHEN 255 THEN ''
WHEN 253 THEN '0'
WHEN 251 THEN '0'
WHEN 254 THEN ''
WHEN 0 THEN '-1,0'
ELSE IFNULL(mg.ID_GROUP, '')
END AS memberGroups
FROM (`ndsunive_e107old`.e107_forum AS f, `ndsunive_e107old`.e107_forum AS c)
LEFT JOIN `ndsunive_e107old`.e107_userclass_classes AS uc ON (uc.userclass_id = f.forum_class)
LEFT JOIN `ndsunive_e107old`.smf_membergroups AS mg ON (mg.groupName = CONCAT('e107 ', uc.userclass_name))
WHERE f.forum_parent != 0
LIMIT 0, 500;
Caused the error:

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='
Title: Re: e107 0.7.16 to SMF 1.1
Post by: Norv on February 18, 2010, 02:26:13 AM
It seems that some of your tables in the database have a collation latin1_swedish_ci, and others, latin1_general_ci. It would be useful to: connect with phpMyAdmin, and list the tables in your e107 database. What is the collation listed for them? Making a screenshot may help.
The same for your SMF database. What is the collation of the tables listed in phpMyAdmin, when you choose the database > Structure tab?

They should be the same, all, in order to avoid problems.
Title: Re: e107 0.7.16 to SMF 1.1
Post by: mostym on February 18, 2010, 05:13:13 AM
It looks like they were different, however, even setting the table to latin1_general_ci, im still getting the same error.
Title: Re: e107 0.7.16 to SMF 1.1
Post by: Norv on February 18, 2010, 07:08:52 AM
Quote from: mostym on February 18, 2010, 05:13:13 AM
It looks like they were different, however, even setting the table to latin1_general_ci, im still getting the same error.

What do you mean, which table? There was only one table with latin1_swedish_ci?
Title: Re: e107 0.7.16 to SMF 1.1
Post by: mostym on February 18, 2010, 12:09:31 PM
the smf tables were all latin1_swedish_ci, and some of the e107 were latin1_swedish_ci as well.  So I changed all of the tables to latin1_general_ci
Title: Re: e107 0.7.16 to SMF 1.1
Post by: Norv on February 18, 2010, 03:07:35 PM
Can you please post the entire current error message?
Title: Re: e107 0.7.16 to SMF 1.1
Post by: mostym on February 19, 2010, 02:22:34 AM
This is the full error

Converting...
Converting members... Successful.
Converting additional member groups...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 13

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ndsunive/public_html/forums/convert.php(941) : eval()'d code on line 37
Successful.
Converting categories... Successful.
Converting boards... Unsuccessful!
This query:
SELECT
DISTINCT f.forum_id AS ID_BOARD, SUBSTRING(f.forum_name, 1, 255) AS name,
SUBSTRING(f.forum_description, 1, 65534) AS description,
CASE
WHEN f.forum_parent > 500
THEN f.forum_parent - 499
ELSE f.forum_parent
END AS ID_CAT, f.forum_sub AS ID_PARENT,
CASE WHEN f.forum_sub = 0 THEN 0 ELSE 1 END AS childLevel, f.forum_threads AS numTopics,
f.forum_threads + f.forum_replies AS numPosts, f.forum_order AS boardOrder,
CASE f.forum_class
WHEN 252 THEN '-1'
WHEN 255 THEN ''
WHEN 253 THEN '0'
WHEN 251 THEN '0'
WHEN 254 THEN ''
WHEN 0 THEN '-1,0'
ELSE IFNULL(mg.ID_GROUP, '')
END AS memberGroups
FROM (`ndsunive_e107old`.e107_forum AS f, `ndsunive_e107old`.e107_forum AS c)
LEFT JOIN `ndsunive_e107old`.e107_userclass_classes AS uc ON (uc.userclass_id = f.forum_class)
LEFT JOIN `ndsunive_e107old`.smf_membergroups AS mg ON (mg.groupName = CONCAT('e107 ', uc.userclass_name))
WHERE f.forum_parent != 0
LIMIT 0, 500;
Caused the error:

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='
Title: Re: e107 0.7.16 to SMF 1.1
Post by: Norv on February 19, 2010, 02:45:42 AM
Well, it seems there still are tables with those two collations.

You could also see them if you: select each database, and go to the Export tab. Export the structure (only the structure, not data), and look at the result. Search the result like any text file, for the text "latin1_swedish_ci" and please take a look at the line where you find it: most likely a statement starting with CREATE TABLE name_of_table_here.

Please note that if a table has a certain collation, then most likely the text-based fields in it also have the same collation. Probably that is the problem: those tables must be fully converted to latin1_general_ci, that is, their fields as well, not only the table itself.

Please make sure you make a full backup of your e107 database before converting character sets and collations, even though these two should be compatible; operations with databases and specially with character sets and collations are not famous for their reliability...
Title: Re: e107 0.7.16 to SMF 1.1
Post by: mostym on February 19, 2010, 07:24:55 PM
I dumped the database to a sql file then searched.  I did a search for latin1_swedish_ci, and it returned nothing.  Any other thoughts?
Title: Re: e107 0.7.16 to SMF 1.1
Post by: Norv on March 18, 2010, 01:19:58 PM
That's odd... Did it really dump the structure, are the other collations listed in the file?
Sorry for the delay. If this is still a problem, please tell, what exactly is the last error?