Problem/Motivation

Notice: Undefined index: date in clientside_validation/clientside_validation_form/clientside_validation_form.module on line 212
This seems to be caused by the form handler calling an element after build processors --> clientside_validation_form_after_build() while the form has a date popup element that wasn't yet processed (date_popup_element_process()).

Proposed resolution

Simply move the affected line into the condition below. $date_title is used anyway just if the if (isset($element['date'])) { condition passes.

Remaining tasks

Reviews needed.

User interface changes

None

API changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

narkoff’s picture

I am getting a similar notice: NOTICE: UNDEFINED INDEX: #TITLE IN CLIENTSIDE_VALIDATION_REGULAR() (LINE 212

I have a date popup as an exposed filter in a view. I applied patch, but error still persists.

narkoff’s picture

Follow-up to #1, my issue is different. I unset the #title and #description for the date popup in template.php to remove the labels. This caused the notices. Adding date labels back, I get no notices. So, I'm able to use date popups without the patch. However, I still need to figure out a way to remove the labels and not get the notices...

joaocsilva’s picture

The patch works fine for me, and makes completely sense since that variable is only used inside of the IF.

nelsongrin’s picture

Status: Needs review » Reviewed & tested by the community