I'm getting this error when trying to add a new TEXT field:
user warning: Field 'description' doesn't have a default value query: drupal_write_record /* drupal : drupal_write_record */ INSERT INTO content_node_field_instance (field_name, type_name, weight, label, widget_type, widget_settings, display_settings, widget_module) VALUES ('field_test_string', 'test_hidden', 0, 'field_test_string', 'text_textfield', 'a:1:{s:4:\"rows\";s:0:\"\";}', 'a:5:{s:5:\"label\";a:1:{s:6:\"format\";s:5:\"above\";}s:6:\"teaser\";a:1:{s:6:\"format\";s:7:\"default\";}s:4:\"full\";a:1:{s:6:\"format\";s:7:\"default\";}i:0;a:1:{s:6:\"format\";s:5:\"above\";}i:1;a:1:{s:6:\"format\";s:7:\"default\";}}', 'text') in D:\net\BlackTea_6.0\includes\common.inc on line 3295.
This is happening when I click the submit button on the "Create New Form" form.
My guess would be that this is coming from content_crud.inc:386, where the $field variable doesn't have a 'description' defined. According to the schema, the description field cannot be NULL and has no DEFAULT defined.
Comments
Comment #1
asimmonds commentedAttached is a small change I did to content_field_instance_collapse() that appears to fix this error, and allow me to create a field properly.
Running php 5.2.5 / mysql 5.0.45 (with strict mode enabled)
Comment #2
corsix commentedPatch works for me, thanks.
Comment #3
yched commentedhttp://drupal.org/node/214406 was marked duplicate (reported the same behavior with PgSQL)
The patch over there fixed it by altering the 'description' column to accept NULL.
I'm actually not sure why this column was set to NOT NULL to begin with, it's probably been the case from the early days.
I went for the minimal change for now, and committed the patch above (and also altered surrounding lines to always provide an empty string instead of NULL for a few other field elements)
Comment #4
yched commentedComment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.