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
Comment #1
kae commentedI 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.
Comment #2
kae commentedwarning: 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.
Comment #3
ultraBoy commentedYes, 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
Comment #4
jonbob commentedAdded default values for the database fields.
Comment #5
jonbob commentedHad to back out that patch; apparently it's not allowed to have default values on large text fields in MySQL.
Comment #6
jonbob commentedComment #7
jonbob commentedExplicit values are now passed in for these insert statements, so this shouldn't happen anymore.
Comment #8
(not verified) commented