Simple Machines Community Forum

SMF Support => Converting to SMF => vBulletin => Topic started by: jlbooker on October 08, 2011, 01:16:17 PM

Title: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: jlbooker on October 08, 2011, 01:16:17 PM
Hi all,

I'm trying to convert from an old instance of vBulletin at version 3.6.8 patch level 2, to the latest version of SMF. I just downloaded the converter today and ran it on a fresh install of SMF.

I'm getting the error:
Converting members...
Successful.
Converting administrators... Successful.
Converting categories...Wrong value type sent to the database. Integer expected. (can_collapse)

Any ideas on how to fix this?
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: Oldiesmann on October 08, 2011, 01:41:48 PM
You're using the "vBulletin 3.6 to SMF 2-0" converter from the downloads page, correct?
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: jlbooker on October 08, 2011, 01:53:40 PM
That's correct. The files I had after un-taring were convert.php and vbulletin36_to_smf.sql.
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: Oldiesmann on October 08, 2011, 02:13:35 PM
It appears there's a typo in the converter.

Make this change to the SQL file:

Find
Code: (Line 107) [Select]
displayorder AS cat_order, '' AS can_collapse
Replace
Code: [Select]
displayorder AS cat_order, 0 AS can_collapse
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: jlbooker on October 08, 2011, 06:50:37 PM
Thanks! That fixed that error. Now I've run into this one:

Code: [Select]
Converting topics...
Successful.
Converting posts (this may take some time)...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 'ORDER BY null' at line 203
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: jlbooker on October 10, 2011, 09:47:58 PM
If a little more detail would help...

The query that's failing is:
INSERT IGNORE INTO `phpws_forums_smf`.smf_messages(`id_msg`, `id_topic`, `poster_time`, `id_member`, `subject`, `poster_name`, `poster_ip`, `id_board`, `smileys_enabled`, `body`, `poster_email`, `modified_name`, `icon`) VALUES (....<bunch of message bodies here>....) ORDER BY null

The URL this fails on is:
convert.php?step=1&substep=7&start=5500

I've tried turning on debug mode (by adding '&debug=1' to the url) It seems to be detecting this flag (I added a line of code to check..), but doesn't ever write a debug log, or output anything different to the browser.
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: Oldiesmann on October 11, 2011, 12:08:43 AM
I'm not sure what's going on with that. This appears to be the query that's causing the problem:

Code: [Select]
---* {$to_prefix}messages (update id_msg)
SELECT postid AS id_msg, username AS modified_name, dateline AS modified_time
FROM {$from_prefix}editlog
ORDER BY dateline;
---*

However, that query shouldn't be interfering with the previous one at all.

Does the SQL file from this topic (http://www.simplemachines.org/community/index.php?topic=152837.0) work any better?
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: jlbooker on October 13, 2011, 09:56:18 AM
That file appears to be largely the same, but it says it's for converting to smf 1.1. I'm using smf 2.0.

I tried it anyways, but it doesn't get past converting the members:
Code: [Select]
Converting members...Unknown column 'memberName' in 'field list'
Any other ideas?
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: Oldiesmann on October 13, 2011, 05:26:03 PM
Ah. I thought that one was for 2.0. Sorry.

I'll send someone else this way who knows more about converters and see if we can figure out what's going on with that query.
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: ardnas on October 28, 2011, 07:10:07 PM
I had the exact same problem as the first poster, and I replaced the values as instructed and now have this error:

Converting polls...Wrong value type sent to the database. Integer expected. (id_member)

help?  Thanks!
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: jlbooker on June 09, 2012, 09:23:36 AM
A quick bump on this topic.

I'm still having the same problem. Is there anyone I can contact who might know more about this particular converter? Would paying for a premium membership be likely to get me anywhere?
Title: Re: vBulletin 3.6.8 pl2 -> SMF Wrong value type sent to the database
Post by: neothemachine on June 11, 2012, 10:51:05 AM
@Oldiesmann: Why isn't the typo fixed in the official downloads? I stumbled upon the same!

EDIT: I also have a polls problem: "Converting polls...Wrong value type sent to the database. Integer expected. (expire_time)" What should I do?

Well, there seems to be an error in the sql script.
The problematic line is line 275 "IF(p.timeout = 0, 0, p.dateline + p.timeout * 86400) AS expire_time,".
The row has dateline=1078492905 and timeout=65535.
p.dateline + p.timeout * 86400 = 6740716905 which is bigger than int.
This should be set to 0 in these cases as obviously no limit is desired.
Quick fix: replace the line with: IF(p.timeout = 0, 0, IF(p.timeout > 30000, 0, p.dateline + p.timeout * 86400)) AS expire_time,


EDIT2: New error, the same as ardnas "Converting polls...Wrong value type sent to the database. Integer expected. (id_member)".
This happens when the thread doesn't exist anymore but the poll still does. Don't know when this can happen, but apparently it does.
Can be fixed easily by adding "WHERE t.threadid IS NOT NULL" after the left join in line 278.