Hi,

I'm having the following error when trying to add some Field Group to Commerce Order Settings:

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value: INSERT INTO {field_group} (identifier, group_name, entity_type, bundle, mode, parent_name, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => group_info|commerce_order|commerce_order|form [:db_insert_placeholder_1] => group_info [:db_insert_placeholder_2] => commerce_order [:db_insert_placeholder_3] => commerce_order [:db_insert_placeholder_4] => form [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => a:5:{s:5:"label";s:9:"Your Info";s:6:"weight";s:2:"44";s:8:"children";a:0:{}s:11:"format_type";s:5:"html5";s:15:"format_settings";a:2:{s:9:"formatter";s:0:"";s:17:"instance_settings";a:3:{s:7:"wrapper";s:0:"";s:7:"classes";s:28:"group-info field-group-html5";s:2:"id";s:0:"";}}} ) in drupal_write_record() (line 7383 of …/includes/common.inc).

Does someone had a same issue or know how to solve it?

Any help welcome!

Comments

sahaj created an issue. See original summary.

mmjvb’s picture

Sounds like a database issue. The column `id` has AUTO_INCREMENT, meaning it would generate a number upon insert.

Try inserting with phpMyAdmin to see whether AUTO_INCREMENT works. Or use SHOW TABLE STATUS and check AUTO_INCREMENT for field_group. That might even fix it for you.

sahaj’s picture

Thanks for the explanation @mmjvb, I could fix the missing AUTO_INCREMENT on id

sahaj’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.