I am using Drupal cvs.
I created a new content type by using CCK, then tried to add new field to this new content type, I received the following error:

user warning: Field 'global_settings' doesn't have a default value query: INSERT INTO node_field (field_name, type) VALUES ('field_field1', 'text_longtext') in C:\progs\web\Apache\Apache2\htdocs\Drupal\drupal-cvs\includes\database.mysql.inc on line 120.
user warning: Field 'widget_settings' doesn't have a default value query: INSERT INTO node_field_instance (type_name, field_name, label, widget_type) VALUES ('content-test1', 'field_field1', 'field1', 'text') in C:\progs\web\Apache\Apache2\htdocs\Drupal\drupal-cvs\includes\database.mysql.inc on line 120.

Comments

kae’s picture

I got an error that looked like this when I forgot to specify the type of field (e.g. text, long). The error message does not indicate the error or allow a way to correct it. I had to delete the field, and reenter it correctly. Then it worked.

Need to make error message correct, and allow way to edit the page again.

kae’s picture

warning: Invalid argument supplied for foreach() in /home/myfof/public_html/drupalecommerce/modules/cck/content.module on line 830.
warning: Invalid argument supplied for foreach() in /home/myfof/public_html/drupalecommerce/modules/cck/content.module on line 834.

actually my error message may have looked like this.

ultraBoy’s picture

Yes, I have the same problem (when not choosing field type while creating new field). Latest Drupal and CCK.

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in c:\webdev\webroot\alongtail05\modules\i\cck\content.module on line 781

jonbob’s picture

Status: Active » Fixed

Added default values for the database fields.

jonbob’s picture

Status: Fixed » Active

Had to back out that patch; apparently it's not allowed to have default values on large text fields in MySQL.

jonbob’s picture

Title: error when adding field » Insertion into database fails due to missing default column values.
jonbob’s picture

Status: Active » Fixed

Explicit values are now passed in for these insert statements, so this shouldn't happen anymore.

Anonymous’s picture

Status: Fixed » Closed (fixed)