When creating a node through a RESTful endpoint using the Services module, a date field that is added to a node and set is required refuses to validate, a null value is stored in the database, and numerous errors are thrown:

"Notice: Undefined index: field_datetest in date_combo_validate() (line 456 of /var/www/lisa.roveworks.com/drupal/public_html/ts49/sites/all/modules/date/date_elements.inc).",
"Warning: date_offset_get() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 565 of /var/www/lisa.roveworks.com/drupal/public_html/ts49/sites/all/modules/date/date_elements.inc).",
"Warning: date_format() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 567 of /var/www/lisa.roveworks.com/drupal/public_html/ts49/sites/all/modules/date/date_elements.inc).",
"Warning: date_format() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 568 of /var/www/lisa.roveworks.com/drupal/public_html/ts49/sites/all/modules/date/date_elements.inc).",
"Warning: date_offset_get() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 570 of /var/www/lisa.roveworks.com/drupal/public_html/ts49/sites/all/modules/date/date_elements.inc).",
"Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 571 of .../sites/all/modules/date/date_elements.inc).",
"Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 572 of .../sites/all/modules/date/date_elements.inc).",
"Warning: date_format() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 573 of .../sites/all/modules/date/date_elements.inc).",
"Warning: date_format() expects parameter 1 to be DateTime, null given in date_combo_validate() (line 574 of .../sites/all/modules/date/date_elements.inc).",
"Notice: Undefined index: timezone in date_field_validate() (line 356 of .../sites/all/modules/date/date.field.inc)."

Making the exact same field "not required" and submitting the exact same date results in a successful validation, with a proper date stored in the node record.

Comments

lhridley’s picture

Issue summary: View changes

Correcting typo

MichaelGreisman’s picture

Is this a problem with the Date module? I thought that creating nodes through Feeds or Services didn't trigger validation. Certainly with Feeds I'm able to create nodes without normally required fields.