News:

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

Main Menu

[SMF Converter] Vanilla 2

Started by Nibogo, October 31, 2010, 01:01:12 PM

Previous topic - Next topic

parthans

THANKS A LOT THANKS A LOT

Only messages haven't synced - meaning the inbox hasnt come in - the sent messages came in fine! :)

You are a Godsend!!

Quote from: margarett on January 27, 2015, 10:23:04 AM
Nevermind that :P

Now try to login to SMF ;) As soon as you can, dive into your Admin --> Maintenance --> Forum Maintenance --> Routine and run "Find and repair any errors" and "Recount all forum totals and statistics"

Fingers crossed ;)

margarett

Quote from: MasterOne on January 27, 2015, 11:26:05 AM
Quote from: margarett on January 27, 2015, 10:41:33 AMCan you let us know which Markdown is that? ;)

The regular Markdown Vanilla comes with. It seemed interesting and really easy at the time we started our forum, but people are so used to BBCode that it may have been the wrong decision after all, especially now with converting in mind.
Something like this
http://www.alfredforum.com/topic/1333-markdown-to-bbcode-20/
should help. Of course it would have to inserted in either the converter itself *or* in a script to be ran after conversion. Not for the fainted hearted, though...
Googling for "markdown to bbcode" actually brings a lot of results ;)

Quote from: parthans on January 27, 2015, 11:47:09 AM
THANKS A LOT THANKS A LOT

Only messages haven't synced - meaning the inbox hasnt come in - the sent messages came in fine! :)

You are a Godsend!!
You're welcome. Welcome to SMF ;)
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

dreyti

Hi all! I'm trying to convert my vanilla 2.0.18.8 to smf 2.0.9
And have this error
QuoteConverting...
Converting members...
Unsuccessful!
This query:
SELECT
m.UserID AS id_member, hxxp:m.name [nonactive] as member_name, m.DateFirstVisit AS date_registered,
(m.CountDiscussions + m.CountComments) AS posts, m.DateLastActive AS last_login,
CASE mr.RoleID WHEN 4 THEN 1 ELSE 0 END AS id_group, m.Password AS passwd,
CONCAT_WS(' ', m.FirstName, m.LastName) AS real_name, hxxp:m.email [nonactive] AS email_address,
CASE m.UtilizeEmail WHEN 1 THEN 0 ELSE 1 END as hide_email, m.Picture AS avatar,
m.RemoteIp AS member_ip, m.RemoteIp AS member_ip2, '' AS password_salt,
'' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
'' AS personal_text, '' AS time_format, '' AS usertitle, '' AS secret_question,
'' AS secret_answer, '' AS validation_code, '' AS additional_groups, '' AS smiley_set
FROM `forum`.GDN_User AS m
LEFT JOIN `forum`.GDN_UserRole AS mr ON (m.UserID = mr.UserID)
LIMIT 0, 500;
Caused the error:
Unknown column 'm.FirstName' in 'field list'

Previous errors I've fixed

dreyti

Quote from: dreyti on April 12, 2015, 07:22:07 AM
Hi all! I'm trying to convert my vanilla 2.0.18.8 to smf 2.0.9
And have this error
QuoteConverting...
Converting members...
Unsuccessful!
This query:
SELECT
m.UserID AS id_member, hxxp:m.name [nonactive] as member_name, m.DateFirstVisit AS date_registered,
(m.CountDiscussions + m.CountComments) AS posts, m.DateLastActive AS last_login,
CASE mr.RoleID WHEN 4 THEN 1 ELSE 0 END AS id_group, m.Password AS passwd,
CONCAT_WS(' ', m.FirstName, m.LastName) AS real_name, hxxp:m.email [nonactive] AS email_address,
CASE m.UtilizeEmail WHEN 1 THEN 0 ELSE 1 END as hide_email, m.Picture AS avatar,
m.RemoteIp AS member_ip, m.RemoteIp AS member_ip2, '' AS password_salt,
'' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
'' AS personal_text, '' AS time_format, '' AS usertitle, '' AS secret_question,
'' AS secret_answer, '' AS validation_code, '' AS additional_groups, '' AS smiley_set
FROM `forum`.GDN_User AS m
LEFT JOIN `forum`.GDN_UserRole AS mr ON (m.UserID = mr.UserID)
LIMIT 0, 500;
Caused the error:
Unknown column 'm.FirstName' in 'field list'

Previous errors I've fixed

Fixed!

DukeofRealms

I'm currently trying to import 14K topics and 100K posts into SMF 2.0 RC3 from Vanilla 2.0.18.14. I've run into a few errors, which I've been able to fix, thanks to the questions made here and in other SMF converters. All members have successfully converted. I've used SMF 2.0 RC3 because that is what this converter has been tested with.

However, I have one very irritating problem. When I first "successfully" converted, I noticed that 4K threads vanished with 30K posts. I looked to see what was the difference between threads that disappear and ones that successfully convert. I noticed that all threads that had disappeared had a entry in the "DateUpdated" table in Vanilla 2. I also noticed that posts in these missing threads had managed to successfully convert, as I could see them in smf_messages. So, I looked through the data to see why they weren't appearing, I looked at the id_topic and searched for it in smf_topics, I discovered that there were no topics that had the ids listed in these missing posts. The relationship between all these missing threads is that they all have an entry in the Vanilla 2 table "DateUpdated", which is modified_time in SMF.

So, I decided to remove all DateUpdated entries and convert again. I ran these in the Vanilla 2 db:
UPDATE `GDN_Discussion` SET `DateUpdated` = NULL
UPDATE `GDN_Comment` SET `DateUpdated` = NULL

I converted again, this time all the threads and posts showed up. I thought it worked and all was well, however when I went to open one of the previously missing threads, I got "Wrong value type sent to the database. Integer expected. (id_msg)"

So, I looked in the database again and noticed that the topics had successfully converted in smf_topics, all the values were correct. But, this time the posts in smf_messages had not, they had incorrect id_board and id_topic values (they were different from the values in smf_topics). When I looked at the threads which had these ids in SMF, I noticed that the posts were actually in these threads, but multiple threads had merged together.

I'm stumped at the moment, I don't know why topics won't be created when a thread has been edited in Vanilla. Or why when I remove the DateUpdated values, the threads are successfully created, but the posts get the wrong id_topic and id_board values. I manually changed a post that had the wrong id_topic and id_board values and it loaded successfully. So, I either need to find out how to stop posts being issued the wrong values when I remove the "DateUpdated" value or fix topics not being created when a "DateUpdated" value is present.

Any help would be greatly appreciated. I've uploaded the converter I am using, as I have modified parts of it.

margarett

Hi

Do not use 2.0 RC 3. Please use 2.0.10 and we will try to fix any issues the converter might have.

I have another converter here in my computer (I'm sorry, I cannot relate to any date of usage of it, dealing with so many converters messes my mind :P ) so please try the files attached *in 2.0.10*
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

DukeofRealms

Quote from: margarett on July 17, 2015, 06:25:13 AM
Hi

Do not use 2.0 RC 3. Please use 2.0.10 and we will try to fix any issues the converter might have.

I have another converter here in my computer (I'm sorry, I cannot relate to any date of usage of it, dealing with so many converters messes my mind :P ) so please try the files attached *in 2.0.10*


I've just taken a look at the converter attached, when I made a difference between the converter attached and the original at the start of this thread, there were no changes. So it's the same converter. This converter has given me a few errors in the past "Wrong value type sent to the database. Integer expected. (last_login)" , duplicate entries, missing emails and so on. I just tried the converter you attached and it made the same errors. So I made a few modifications to the original converter as suggested in this thread, and some of my own edits for errors that weren't listed here.

You can see the changes I made here: https://github.com/Realms-Network/Vanilla-2-to-SMF-2/commit/e9f6dfca6335e68be58d243cd8fdcf3109fa54c1 [nofollow]I'll try my edited converter in 2.0.10 and see how it goes :)

DukeofRealms

Ok, so it looks like the topics and posts were created when I used my edited converter in 2.0.10. But they were still missing from the categories and stats. So I looked in the DB to see why, the smf_messages table looked fine. However, the smf_topics is definitely odd, id_first_msg and id_last_msg are the same value as the modified_time value of the first message of that topic id in smf_messages. When they of course should be the message ids of the last and first post.


I'll give an example, say the original message (the thread) has a modified_time value of 1367871842 then both id_first_msg and id_last_msg have 1367871842.

margarett

Go to your ACP and perform the maintenance tasks "Find and repair errors" and "Recount totals". That should bring stuff back in place :)
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

DukeofRealms

Quote from: margarett on July 17, 2015, 09:10:14 AM
Go to your ACP and perform the maintenance tasks "Find and repair errors" and "Recount totals". That should bring stuff back in place :)


Unfortunately, that did not put things pack into place, it just asked to fix cached words and unknown. I've repeated the find and repair errors and recount totals a few times now, but it's still not putting the correct id_last_msg and id_first_msg values in place  :-\

margarett

So it's not the problem I thought it was, it's something wrong with the converter really. I need to give it a closer look (although I never really touched a "vanilla" 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

DukeofRealms

Quote from: margarett on July 17, 2015, 09:34:04 AM
So it's not the problem I thought it was, it's something wrong with the converter really. I need to give it a closer look (although I never really touched a "vanilla" database)


Well this code in vanilla2_to_smf.sql looks interesting:


'id_first_msg' => $row['modified_time'],
'id_last_msg' => $row['modified_time'],

margarett

Eh :P

Anyway that converter looks quite messed, I have to admit... It is adding a post when converting topics?
convert_insert('messages',
array(
'id_topic', 'id_board', 'poster_time', 'id_member', 'subject', 'poster_name', 'poster_email', 'poster_ip', 'modified_time', 'modified_name', 'body'),
array(
$row['id_topic'], $row['id_board'], $row['poster_time'], $row['id_member_started'], $row['subject'], $row['poster_name'], $row['poster_email'], "", $row['modified_time'], $row['modified_name'], $row['body'])
);

Then of course the IDs don't fit correctly.

I really need to get my hands on a test install here. Do you know where I cant get 2.0.something? On the site the available version is 2.1.11 and I assume that it will have database changes from the version you run...
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

DukeofRealms

Quote from: margarett on July 17, 2015, 10:24:54 AM
Eh :P

Anyway that converter looks quite messed, I have to admit... It is adding a post when converting topics?
convert_insert('messages',
   array(
      'id_topic', 'id_board', 'poster_time', 'id_member', 'subject', 'poster_name', 'poster_email', 'poster_ip', 'modified_time', 'modified_name', 'body'),
   array(
      $row['id_topic'], $row['id_board'], $row['poster_time'], $row['id_member_started'], $row['subject'], $row['poster_name'], $row['poster_email'], "", $row['modified_time'], $row['modified_name'], $row['body'])
);

Then of course the IDs don't fit correctly.

I really need to get my hands on a test install here. Do you know where I cant get 2.0.something? On the site the available version is 2.1.11 and I assume that it will have database changes from the version you run...


Here is my version: http://vanillaforums.org/addon/vanilla-core-2.0.18.4 [nofollow]


Just change the numbers in the link to get to different versions :P And yes, the 2.1 versions do have quite a few differences to the 2.0 versions in the db. This converter does not work at all with 2.1.

DukeofRealms

Quote from: margarett on July 17, 2015, 10:24:54 AM
Anyway that converter looks quite messed, I have to admit... It is adding a post when converting topics?


Well, it has to add a post when converting topics. As Vanilla 2.0 has the first post's "subject" (called "Name" in Vanilla) and "body" (same name in Vanilla) in the table GDN_Discussion (the topic table in Vanilla) and all post's content after the first post are in the GDN_Comment table. SMF has all posts, including the first in the smf_messages table, so when converting a topic from Vanilla 2.0, one must also create a post from the GDN_Discussion table for the first post and then all following posts are in the GDN_Comment table.

margarett

Oh I see.

I have to check with more time and attention. You can't convert the topic and give it an id_first_message if you still don't know which ID it will have... No idea how to work that out for now...
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

DukeofRealms

Quote from: margarett on July 17, 2015, 11:06:58 AM
Oh I see.

I have to check with more time and attention. You can't convert the topic and give it an id_first_message if you still don't know which ID it will have... No idea how to work that out for now...


Hmm, well it manages to do it with all topics that don't have a modified_time value in it. So, I'm not sure why having that changes things.

DukeofRealms

I've managed to convert Vanilla 2.0 to SMF successfully using the converter I attached in one of my previous posts. The converter never finished the forum statistic recalculation, so I manually entered in the next steps and ran them. This fixed the issue where topics that had been edited didn't have the right ids for first and last messages.

I might look into fixing the issue to prevent having to do the steps manually when I get some free time.

margarett

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

JanHoos

I got the logged in and date registered error as well. Fixed that with the second post in this topic.

But I encountered duplicate board error:
Converting members... Successful.
Converting boards...Duplicate entry '1' for key 'PRIMARY'

Advertisement: