Simple Machines Community Forum

SMF Support => Converting to SMF => IPB => Topic started by: xSupervisoRx on November 13, 2011, 04:49:26 PM

Title: Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"
Post by: xSupervisoRx on November 13, 2011, 04:49:26 PM
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?
Title: Re: Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"
Post by: Oldiesmann on November 14, 2011, 01:50:57 PM
Which converter are you using? The "Invision to SMF Converter" from the downloads page shouldn't have that problem.
Title: Re: Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"
Post by: xSupervisoRx on November 16, 2011, 01:05:30 PM
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
Title: Re: Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"
Post by: Oldiesmann on November 21, 2011, 07:53:45 PM
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
Title: Re: Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"
Post by: 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
Title: Re: Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"
Post by: Oldiesmann on November 24, 2011, 11:35:23 AM
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.
Title: Re: Convert Error IPB 3.1.3 > SMF "Field 'buddy_list' doesn't have a default value"
Post by: Oldiesmann on November 25, 2011, 12:11:22 PM
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.