Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
clientside_validation-fix-for-date-popup-handling.patch | 1.14 KB | das-peter | |
Comments
Comment #1
narkoff CreditAttribution: narkoff commentedI 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.
Comment #2
narkoff CreditAttribution: narkoff commentedFollow-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...
Comment #3
joaocsilva CreditAttribution: joaocsilva as a volunteer and at European Commission and European Union Institutions, Agencies and Bodies commentedThe patch works fine for me, and makes completely sense since that variable is only used inside of the IF.
Comment #4
nelsongrin CreditAttribution: nelsongrin at European Commission and European Union Institutions, Agencies and Bodies for European Commission and European Union Institutions, Agencies and Bodies commentedWorks for me as well.
Comment #5
nelsongrin CreditAttribution: nelsongrin at European Commission and European Union Institutions, Agencies and Bodies for European Commission and European Union Institutions, Agencies and Bodies commented