• Welcome to Simple Machines Community Forum. Please login or sign up.
November 26, 2021, 08:01:16 PM

News:

SMF 2.0.18 has been released! Please update. Read more.


2.0.0 to SMF: Converting members...Wrong value type sent to the database.

Started by LeYoyo, June 05, 2014, 08:43:33 AM

Previous topic - Next topic

LeYoyo

Hi all,

I'm trying to convert from IPB 2.0.0 trial to the latest SMF.

I have downloaded and installed the latest conversion tool.

By running it, I had first the "birthday" error. Fixed by adding a solution found here

                     if(!preg_match('/\d{4}-\d{2}-\d{2}/', $row['birthdate']))
                        $row['birthdate'] = '0001-01-01';


Now I have another issue: Converting members...Wrong value type sent to the database. Integer expected. (instant_messages)

Any advice about this one ?

Thanks in advance
Sous SMF 2.0.8

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

LeYoyo

Sous SMF 2.0.8

margarett

Of course :P Did you get it from the downloads page or one of the sticky topics in this board?
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


margarett

Thanks ;) I needed to know which file to pick.

That issue is caused by your original database (IPB) has something other than in integer in that column (most likely a NULL). So we have to tell the converter to make all those rows in integers.
Open the .sql file and find:
$row['signature'] = substr(strtr(strtr($row['signature'], '<>', '[]'), array('[br /]' => '<br />')), 0, 65534);
Add after:
$row['instant_messages'] = (int)$row['instant_messages'];
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

LeYoyo

Added here:

), ltrim($row['signature'])));
$row['signature'] = substr(strtr(strtr($row['signature'], '<>', '[]'), array('[br /]' => '<br />')), 0, 65534);
$row['instant_messages'] = (int)$row['instant_messages'];



Same error :(  Converting members...Wrong value type sent to the database. Integer expected. (instant_messages)
Sous SMF 2.0.8

LeYoyo

Just wondering about one point : do I use the right converter ?
Sous SMF 2.0.8

margarett

It seems you are, if you downloaded the latest version from the downloads page ;)

I forgot this issue, sorry. But I can't really understand why you're still having that error :(
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

LeYoyo

Is there any way to drop the IPB instant message values ?
It's a workaround, but at least, after migration I could inform the members that they have to refill these informations.
Sous SMF 2.0.8

margarett

Maybe the sense is different here. What values do you have in IPB's table in the corresponding field?
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

LeYoyo

Humm, strange... I couldn't find an instant_message field in the member tables...

In the ibf_member_extra table I have:

aim_name = varchar(40)
icq = int(15)
yahoo = varchar(40)
msn = varchar(200)
skype = varchar(250)
Sous SMF 2.0.8

Oldiesmann

"instant_messages" is the name of the column in SMF. It should be called "msg_total" in the IPB database.
Michael Eshom
Cincy Space - now open!

LeYoyo

Sous SMF 2.0.8

margarett

Give your IPB table a look, check for non-integer values in that column
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

LeYoyo

I did a double check, but can't find something else as integers (from 0 to 403) or NULL value
Sous SMF 2.0.8

margarett

Hummmm how odd...

Check the latest row that was added to SMF members table, get his id, then go to IPB members table and check what the next id has in msg_total, please
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

LeYoyo

Sous SMF 2.0.8

margarett

Hu, right on the first row? Damn... And what value has your first row in IPB's table?
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


Advertisement: