News:

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

Main Menu

Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"

Started by xSupervisoRx, November 13, 2011, 04:49:26 PM

Previous topic - Next topic

xSupervisoRx

Hi Guys!

I was trying to convert my DB to SMF from IPB 3.1.3 but i have seen this error:

Converting members...Field 'buddy_list' doesn't have a default value

Has anyone know how to solve this?

Oldiesmann

Which converter are you using? The "Invision to SMF Converter" from the downloads page shouldn't have that problem.
Michael Eshom
Christian Metal Fans

xSupervisoRx

I'm using the IPB to SMF Converter (http://download.simplemachines.org/index.php?thanks;filename=smf_2-0_invision_converter.zip)

I tried to modify the data type on SMF DB of this object (Buddylist) from TEXT to VARCHAR(255) because as the error says this object on DB doesn't has a defaut value.. But, other objects ahead takes me the same errors  :P

If this can help, i'm using the newer version of SMF. I don't know if this can be the responsible of the error.  :o

Oldiesmann

I don't understand why that's happening though, as SMF specifically inserts an empty string into that field.

The error is ultimately because MySQL has been installed with "strict mode" enabled. This option is basically designed to allow developers to improve their queries, and makes MySQL complain about things it would otherwise ignore (such as not inserting data into a text column that's "NOT NULL").

If you change this, does it make any difference?

Find
IFNULL(email_pm, 0) AS pm_email_notify, '' AS lngfile, '' AS buddy_list

Replace
IFNULL(email_pm, 0) AS pm_email_notify, '' AS lngfile, ' ' AS buddy_list
Michael Eshom
Christian Metal Fans

xSupervisoRx

Well.. this mod solved that error... Than:

Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Unsuccessful!
This query:
if(empty($row['id_board']))
$row['id_board'] = 1
LIMIT 0, 200;
Caused the error:
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 'if(empty($row['id_board']))
$row['id_board'] = 1
LIMIT 0, 200' at line 1


I think this is an MySQL Syntax error.. But as i can see, nothing is wrong  ???

If this can help:
MySQL v5.5.17
Windows System - IIS Server

Oldiesmann

Quote from: xSupervisoRx on November 23, 2011, 09:20:06 PM
Well.. this mod solved that error... Than:

Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Unsuccessful!
This query:
if(empty($row['id_board']))
$row['id_board'] = 1
LIMIT 0, 200;
Caused the error:
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 'if(empty($row['id_board']))
$row['id_board'] = 1
LIMIT 0, 200' at line 1


I think this is an MySQL Syntax error.. But as i can see, nothing is wrong  ???

If this can help:
MySQL v5.5.17
Windows System - IIS Server

For some reason, it's trying to pass PHP code as a MySQL query. I'll take a look at it later tonight. I'm at work right now and we're having Thanksgiving dinner at my house, so I won't be online to look at it until probably 9pm or later.
Michael Eshom
Christian Metal Fans

Oldiesmann

Did some more checking and I can't find that code anywhere in either of the converter files (convert.php and invision_2_smf.sql). I'll send a developer this way and see if someone else can figure out what's going on.
Michael Eshom
Christian Metal Fans

Advertisement: