Page 1 of 1

Error: Field 'image' doesn't have a default value

Posted: Wed Sep 09, 2009 4:18 am
by aai2on
When I go to add an image for a product, I get Error No. 1364

INSERT INTO category SET parent_id = 0, sort_order='0', date_modified=NOW(), date_added=NOW()

Error is: Field 'image' doesn't have a default value.

Re: BUGS WITH IMAGES

Posted: Wed Sep 09, 2009 4:25 am
by Daniel
This is because your MySQL is configured to strict.

It will be fixed in the next version.

Re: BUGS WITH IMAGES

Posted: Wed Sep 09, 2009 4:47 am
by aai2on
ETA on the fixed version?

Re: BUGS WITH IMAGES

Posted: Wed Sep 09, 2009 5:00 am
by Qphoria
Here you go ... try this:

EDIT: system/database/mysql.php
FIND:

Code: Select all

mysql_query("SET NAMES 'utf8'", $this->connection);
mysql_query("SET CHARACTER SET utf8", $this->connection);
mysql_query("SET CHARACTER_SET_CONNECTION=utf8", $this->connection);
AFTER ADD:

Code: Select all

mysql_query("SET SQL_MODE = ''", $this->connection);

Re: BUGS WITH IMAGES

Posted: Thu Sep 10, 2009 10:06 pm
by Lestat
Thank you Qphoria. I was trying to figure out what was wrong for an hour :)