This happens with the following modules:
Field Label Plurals
:
If I change any options on this page and save. The page seems to refresh and nothing has changed. If I redo changes and save, I get the following truncated error:
Fatal error: Call to undefined function date_field_widget_settings_form_validate() in .../drupal/includes/form.inc on line 1389
I'm not sure where to start troubleshooting this. I've removed all date fields, uninstalled date and calendar and reinstalled, etc. and am still getting the same error. Using Drupal 7.14.
Field Display Label
:
#1889544: Date field incompatible? Error when saving field....
Fatal error: Call to undefined function date_field_widget_settings_form_validate() in /home/public_html/includes/form.inc on line 1406
I tried to save a date field with a different display label. Cause the error above. Something I did wrong?
Comments
Comment #1
Jon Betts CreditAttribution: Jon Betts commentedOK, after a few days of rebuilding and applying modules one-by-one, it appears that the problem occurs when activating the "Field label plurals" module. Feel free to remove this issue or keep it around in case someone else has the same issue. I'll post an issue, if needed in the Field label plurals module issuse queue as well.
Comment #2
KarenS CreditAttribution: KarenS commentedGlad you figured that out. Let's close this issue, but I'll re-name it so people can find it.
Comment #3
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedAlright. I debugged it and found the problem: Date module is lazy loading the validation handlers, even if it shouldn't do it that way.
Scenario:
Instead Date module should keep its promise to FAPI and have the validation handlers around. Form builder available <=> validation handlers available.
Here's a patch that would solve this by moving the validation handlers next to the form builder stubs.
Comment #5
Niklas Fiekas CreditAttribution: Niklas Fiekas commented(Test failures look unrelated.)
Comment #6
gmclelland CreditAttribution: gmclelland commentedI ran into the same error. The patch in #3 applied cleanly for me and I don't see any more errors when I created the date field.
Hope that helps
Comment #7
GaëlGWorks for me too.
Comment #8
arlinsandbulte CreditAttribution: arlinsandbulte commented#3: 1699312-element-validation-handler-loading-3.patch queued for re-testing.
Comment #10
pounardHere is an updated working patch (at least for the fatal I got) hope this helps.
Comment #12
pounardNormal, I did a stupid stupid typo error, uploading new one!
Comment #13
pounardAs a side note, this does not only do a fatal when using the Field Label Plurals module, we experienced it without.
Comment #15
markabur CreditAttribution: markabur commentedI applied #12 to Date 2.6 and it took care of the error for me.
Comment #16
mcabalaji CreditAttribution: mcabalaji commented12: 1699312-12-date_field_validate_fatal.patch queued for re-testing.
Comment #19
klonosThis seems to be a more generic issue that happens with other modules as well. One example is Field Display Label. Updated the issue summary to include it as an example and the issue title to be more generic.
Comment #20
gmclelland CreditAttribution: gmclelland commentedHere is a reroll of #12
Comment #22
gmclelland CreditAttribution: gmclelland commentedHere is a reroll of #3
Comment #23
gmclelland CreditAttribution: gmclelland commentedAnd back to NR
Comment #25
gmclelland CreditAttribution: gmclelland commentedWell that sucks, anybody know why the patches are failing?
Comment #26
Katrina B CreditAttribution: Katrina B commentedThe "Field Label Plurals" module does seem to be the culprit. If I disable it -- no error. If I enable it and try to edit a date field -- error. Unfortunately, I need the plurals module; the only temporary solution seems to be to disable (deactivate) the plurals module, modify the date field, then reactivate (re-enable) the plurals module.
Not a great solution -- but one that works (for now).
Comment #27
pounardGot the error without.
Comment #28
hyscaler CreditAttribution: hyscaler commentedThis also appears for Multivalue Settings module.
Comment #31
netlooker CreditAttribution: netlooker commentedI've tried to resolve this issue today. I've checked latest patch and I was able to apply it without problems. What I've done is just a moving of helper functions witch were related to the form stuff.
Comment #32
pfrenssenFor me this bug occurs when altering the date field instance form and introducing AJAX. When the AJAX response is generated only
date.field.inc
is loaded which contains the maindate_field_instance_settings_form
. For some bizarre reason the form validate handler and some helper functions that are uniquely used in this form are located in a different filedate_admin.inc
which is not included in this page request.I reviewed the patch. It solves the issue responsibly. Not a single line of code is changed, it just moves the validate handler and helper functions into the right file.
Comment #33
Plazik CreditAttribution: Plazik commented#31 works for me.
Comment #36
Morasta CreditAttribution: Morasta commentedThis is also a problem with the Required by role module. Ran the patch in #31 against date 2.8 and it solved the problem.
Comment #37
esmitex CreditAttribution: esmitex commentedI have the same issue:
but i don't have the fields plural plugin.
Comment #38
azinck CreditAttribution: azinck commentedRe-rolled. But not a strict re-roll. I just touched the validation functions and instead of moving them to date.field.inc entirely, I just followed the pattern set forth for the form-building methods (so as to limit amount of code included).
Comment #39
leendertdb CreditAttribution: leendertdb commentedWe also had the same problem, but the field plural module was not installed. So I'm assuming this bug can have multiple different causes.
The patch from #38 works perfect and solves the "Fatal error: Call to undefined function date_field_widget_settings_form_validate()" error for us. Thanks all!
Updating status to RTBC. Can we get this committed please?
Comment #41
podarok#38 is merged. Thanks