Advertisement:

Author Topic: 2.0.0 to SMF: Converting members...Wrong value type sent to the database.  (Read 21364 times)

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Which converter are you using?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
Invision 2 to SMF 2-0
Sous SMF 2.0.8

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
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

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
Sous SMF 2.0.8

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
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:
Code: [Select]
$row['signature'] = substr(strtr(strtr($row['signature'], '<>', '[]'), array('[br /]' => '<br />')), 0, 65534);Add after:
Code: [Select]
$row['instant_messages'] = (int)$row['instant_messages'];
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
Added here:

Code: [Select]
), 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

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
Just wondering about one point : do I use the right converter ?
« Last Edit: June 10, 2014, 05:26:14 AM by LeYoyo »
Sous SMF 2.0.8

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
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

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
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

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
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

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
"instant_messages" is the name of the column in SMF. It should be called "msg_total" in the IPB database.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
OK, sorry ^^

msg_total     smallint(5)

Sous SMF 2.0.8

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
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

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
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

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
No row were added to the SMF members DB
Sous SMF 2.0.8

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
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

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline LeYoyo

  • Jr. Member
  • **
  • Posts: 251
1100
Sous SMF 2.0.8