When submitting a "modify entity values" action via VBO, if there are any entities with required date fields, the date field validation gets triggered even if the fields are not selected for modification (ie. the field's boxes are not checked).

Different issue, i guess, from #1450886: "Modify entity values" not setting #required => FALSE for hidden fields, even though the error message is the same "X is required".

Comments

grossmann’s picture

+1 Same problem here with a required date field. It is not even on the same content type. Running 7.x-3.1.

grossmann’s picture

This seems to be an "date" issue because the VBO function checks for the #required class and unset it with

function _views_bulk_operations_modify_action_unset_required(&$element) {
  unset($element['#required']);
  foreach (element_children($element) as $key) {
    _views_bulk_operations_modify_action_unset_required($element[$key]);
  }
}

in modify.action.inf. But the date module does not set the #required class (patch in #301538: Date field does not use #required to mark required date fields does not work for me). But if there is no #required class on date fields where comes the error message from?