Jump to content

6|1364; Field 'id_parent' doesn't have a default value


techkoop

Recommended Posts

Hi Iam using 1.6.1.7 and eMagic one store manager prof version

 

when i imort product or product updates and publish them to the web with eMagic store manager i get

 

6|1364; Field 'id_parent' doesn't have a default value
INSERT INTO ps_category (`id_category`,`level_depth`,`nleft`,`nright`) VALUES ("23","2","3","4"),("24","2","5","6"),("12","2","7","8"),("13","2","9","10"),("15","2","11","12"),("17","2","13","14"),("16","2","15","16"),("18","2","17","18"),("20","2","19","20"),("21","2","21","22"),("22","2","23","24") ON DUPLICATE KEY UPDATE `level_depth` = VALUES(`level_depth`), `nleft` = VALUES(`nleft`), `nright` = VALUES(`nright`);

 

i checked the raw table but these values are allready there:

 

id_category id_parent id_shop_default level_depth nleft nright active date_add date_upd position is_root_category 1 0 1 0 1 26 1 22-9-2016 14:53 22-9-2016 14:53 0 0 2 1 1 1 2 25 1 22-9-2016 14:53 22-9-2016 14:53 0 1 12 2 1 2 7 8 1 11-10-2016 14:34 24-3-2017 17:15 0 0 13 2 1 2 9 10 1 11-10-2016 14:43 4-3-2017 19:39 1 0 15 2 1 2 11 12 1 11-10-2016 14:52 4-3-2017 19:39 2 0 16 2 1 2 15 16 1 11-10-2016 14:55 4-3-2017 19:39 4 0 17 2 1 2 13 14 1 2-11-2016 12:25 8-5-2017 06:15 3 0 18 2 1 2 17 18 1 14-11-2016 14:54 4-3-2017 19:39 5 0 20 2 1 2 19 20 1 3-3-2017 18:46 8-5-2017 06:18 6 0 21 2 1 2 21 22 1 4-3-2017 06:32 4-3-2017 19:39 7 0 22 2 1 2 23 24 1 4-3-2017 11:37 4-3-2017 19:39 8 0 23 2 1 2 3 4 1 25-3-2017 08:02 25-3-2017 08:02 0 0 24 2 1 2 5 6 1 8-5-2017 11:25 8-5-2017 11:25 0 0

 

 

Link to comment
Share on other sites

Hi Iam using 1.6.1.7 and eMagic one store manager prof version

 

when i imort product or product updates and publish them to the web with eMagic store manager i get

 

6|1364; Field 'id_parent' doesn't have a default value

INSERT INTO ps_category (`id_category`,`level_depth`,`nleft`,`nright`) VALUES ("23","2","3","4"),("24","2","5","6"),("12","2","7","8"),("13","2","9","10"),("15","2","11","12"),("17","2","13","14"),("16","2","15","16"),("18","2","17","18"),("20","2","19","20"),("21","2","21","22"),("22","2","23","24") ON DUPLICATE KEY UPDATE `level_depth` = VALUES(`level_depth`), `nleft` = VALUES(`nleft`), `nright` = VALUES(`nright`);

 

i checked the raw table but these values are allready there:

 

id_category id_parent id_shop_default level_depth nleft nright active date_add date_upd position is_root_category 1 0 1 0 1 26 1 22-9-2016 14:53 22-9-2016 14:53 0 0 2 1 1 1 2 25 1 22-9-2016 14:53 22-9-2016 14:53 0 1 12 2 1 2 7 8 1 11-10-2016 14:34 24-3-2017 17:15 0 0 13 2 1 2 9 10 1 11-10-2016 14:43 4-3-2017 19:39 1 0 15 2 1 2 11 12 1 11-10-2016 14:52 4-3-2017 19:39 2 0 16 2 1 2 15 16 1 11-10-2016 14:55 4-3-2017 19:39 4 0 17 2 1 2 13 14 1 2-11-2016 12:25 8-5-2017 06:15 3 0 18 2 1 2 17 18 1 14-11-2016 14:54 4-3-2017 19:39 5 0 20 2 1 2 19 20 1 3-3-2017 18:46 8-5-2017 06:18 6 0 21 2 1 2 21 22 1 4-3-2017 06:32 4-3-2017 19:39 7 0 22 2 1 2 23 24 1 4-3-2017 11:37 4-3-2017 19:39 8 0 23 2 1 2 3 4 1 25-3-2017 08:02 25-3-2017 08:02 0 0 24 2 1 2 5 6 1 8-5-2017 11:25 8-5-2017 11:25 0 0

 

 

 

Hello,

 

In order to rectify the issue, you can implement changes to bridge.php file (if you are using simple bridge connection in Store Manager). Add the variable

$_REQUEST['sql_compatibility']=''; to the bridge.php as the screenshot shows. This

will allow Store Manager to post empty values to the database.

 

post-783503-0-01200700-1494591037_thumb.png

 

Edited by Iryna (see edit history)
  • Like 2
Link to comment
Share on other sites

Hello,

 

“Id_parent field” doesn’t have default value. In MySQL this table looks like  

"id_parent" as not null”  without a default value. The error you get is related to STRICT_ALL_TABLES or STRICT_TRANS_TABLES enabled on your server that does not allow to publish “id_parent” without default value.

 

To avoid this you need to replace SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES) in the following way SET GLOBAL sql_mode = REPLACE([spam-filter]sql_mode,'STRICT_TRANS_TABLES','');

 

You are not serious, aren't you?

 

Firstly, almost nobody can change MySQL settings.

Secondly, "id_parent" as not null without a default value is meant on purpose, to force this value, because there is NO default value defined.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...