News:

Join the Facebook Fan Page.

Main Menu

[SMF Converter] THWBoard

Started by ThorstenE, August 13, 2008, 01:58:13 PM

Previous topic - Next topic

ThorstenE

Software: THWBoard
Version: 3.0

This is the official support topic for THWBoard converter.  Use this topic to ask for support for this converter.

Note: This was tested on thwb-300-beta-2.84, but should in theory work on other versions of THWBoard if the database changes have not been to great.

Does Not Convert

  • Permissions (This might not be supported at all so please check permissions before making the board live..)

Changelog


convert.php
Use this convert.php with the .sql file attached in this topic.

Askir

#1
Helo,

I have a problem with your converter :-(
My board Version: thwb-300-beta-2.84

This come at step 1 (the secound page)
I try it and he say to me this:

Quote
Converting...
Converting members... Unsuccessful!
This query:
SELECT
userid AS ID_MEMBER, SUBSTRING(username, 1, 255) AS memberName,
SUBSTRING(username, 1, 255) AS realName, useremail AS emailAddress,
SUBSTRING(userpassword, 1, 60) AS passwd, userposts AS posts,
SUBSTRING(usertitle, 1, 255) AS usertitle,
userlocation AS location, userlastpost AS lastLogin,
IF(userisadmin = '1', 1, 0) AS ID_GROUP, userjoin AS dateRegistered,
SUBSTRING(userhomepage, 1, 255) AS websiteUrl, useravatar AS avatar,
SUBSTRING(userhomepage, 1, 255) AS websiteTitle, SUBSTRING(usericq, 1, 255) AS ICQ,
SUBSTRING(useraim, 1, 16) AS AIM, '' AS YIM, userinvisible AS showOnline,
SUBSTRING(usermsn, 1, 255) AS MSN, SUBSTRING(usersignature, 1, 65534) AS signature,
userhideemail AS hideEmail, '' AS totalTimeLoggedIn,
IF(useractivate = '0', 1, 0) AS is_activated, u.userbday AS birthdate
FROM `zulu_forum`.tb_user
LIMIT 0, 500;
Caused the error:

Unknown table 'u' in field list

What i can do?

Best

ThorstenE

Try the attached version please..

Askir

Yeah, it works perfekt :) Thanks  8)

Askir

#4
Hm, ok i found a converter error.
By some topics the forum show the replies same as the views?

I try it again, but the same error...  :-\

ThorstenE

another small bug..  O:)
try this version..

btw, Admin - Maintenance - Find and repair any errors should also fix it..

Askir

sooo, now yes now it works perfect, all ;-)

Thanks for your support.

and thanks for this perfect forum ;-)

steiger

Is this topic also used for converting to SMF 2 RC2?
If not, please move my posting to the right place.

I just tried to convert using the latest files from the download area and I got two errors. I could fix the first one but I am hanging on the second one.


Converting members
The SELECT statement contains
'' AS total_time_logged_in

This generates the error:
Wrong value type sent to the database. Integer expected. (total_time_logged_in)

If I change this to
0 AS total_time_logged_in
it works.


Converting topics...Wrong value type sent to the database. Integer expected. (id_member_updated)
I can't fix this.
id_member_updated is mediumint(8)
r.userid which is referenced is int(10)

Every CAST statement I tried resulted in a SQL Syntax error.
I am used to work with SQL Server, DB2 and Oracle but have almost no experience with mySQL.

BTW, I am using MySQL  5.0.77 on CentOS 5.4

Regards
Michael

ThorstenE

Sorry, our 2.0 converters are still in developement and a bit "buggy".. I'd recommend to use the 1.1.x converter instead. You can upgrade your forum afterwards.

Upgrading SMF

steiger

Quote from: TE on January 22, 2010, 11:56:34 AM
Sorry, our 2.0 converters are still in developement and a bit "buggy".. I'd recommend to use the 1.1.x converter instead. You can upgrade your forum afterwards.

Upgrading SMF
I know but the RC1 version did work, so I tried the current one.

Will have to implement the hard way (1.1.x - convert - upgrade)

Thanks
Michael

Norv

I suspect the value that is sent to the database this time is NULL or an empty string, as id_member_updated. That is, it may be better if you use in the .sql file:
Code (find) Select

r.userid AS id_member_updated,


Code (replace) Select

IFNULL(r.userid, 0) AS id_member_updated,


Please note that it's not tested.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

steiger

Hi Norv,
good point.

I have now setup a new testforum using 1.x -> convert -> upgrade to 2.0RC2.
But the next time I will try to use your fix.

steiger

#12
Hello again,

I just tried to convert a very old thwboard forum to SMF 2.0.2 using the existing converter.
While converting it had a problem with
Duplicate entry for key PRIMARY
in topics.
After analyzing convert.php and many debug entries I solve the problem by adding
ORDER BY id_topic
as the last line of the topics SELECT statement.

Somehow after a few valid 500 entry blocks the LIMIT 3500, 500 block returned rows which were already returned before and which were out of order.
The ORDER BY solved this situation.


In addition to that I added the above mentioned fixes so the complete topics SELECT is now:
---* {$to_prefix}topics
SELECT
   t.threadid AS id_topic, t.boardid AS id_board,
   t.threadtop AS is_sticky, t.threadviews AS num_views,
   IFNULL(u.userid,0) AS id_member_started,
   IFNULL(r.userid,0) AS id_member_updated,
   MIN(p.postid) AS id_first_msg, MAX(p.postid) AS id_last_msg,
   t.threadviews AS num_replies,    t.threadclosed AS locked
FROM {$from_prefix}thread AS t
   LEFT JOIN {$from_prefix}user AS u ON (t.threadauthor = u.username)
   INNER JOIN {$from_prefix}post AS p ON (p.threadid=t.threadid)
   LEFT JOIN {$from_prefix}user AS r ON (t.threadlastreplyby = r.userid)
GROUP BY t.threadid
HAVING id_first_msg != 0
   AND id_last_msg != 0
ORDER BY id_topic;   
---*


As stated in a previous posting I also had to change for "Converting members"
'' AS total_time_logged_in
to
0 AS total_time_logged_in

And also for "Converting personal messages (step 2)"
'' AS deleted
to
0 AS deleted


I doubt that this converter is used very often but could you please change this.

Thanks
Michael

Advertisement: