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
Call to undefined function webform_component_parent_keys()
Seeing this infrequently in my error log.
Proposed resolution
Add the include to the info file so it gets loaded by the auto loader.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#2 | call_to_undefined-2506403-2.patch | 768 bytes | joelpittet |
Comments
Comment #1
joelpittetThe stack trace is showing it originates from 1112 of webform.conditionals.inc
Comment #2
joelpittetThis may be a bit better solution, see patch.
Comment #3
DanChadwick CreditAttribution: DanChadwick commentedHere's what happens:
But webform_client_form also uses form_load_include to include webform.components.inc, so the patch in #2 should not be necessary.
I'm guessing that something happened to the form by way of a form_alter or perhaps theme that is causing the form_load_include to not load, or perhaps some ajax / jQuery request. You will need to debug to see how this is possible.
While it is possible that webform has a bug here, I'd say it is extremely unlikely. A call to an undefined function is fatal and people would be seeing errors and we'd have lots of reports. Something is different about your installation.
If you verify that this can happen on a clean installation, please change the status back to Bug and re-open as Active. Thanks.
Comment #4
joelpittetIn my case it could be authcache or js module that may be altering things in a funky way... my eye is on authcache. *squints*
Comment #5
DanChadwick CreditAttribution: DanChadwick commentedA stack trace would give some clues, maybe. If no one is complaining, maybe its an ajax error where you wouldn't see the failure??
Comment #6
joelpittetIt's the only error showing up in my watchdog at the moment so I'm trying to knock it out.
Here's the callstack from new relic:
And another maybe unrelated webform error:
Comment #7
DanChadwick CreditAttribution: DanChadwick commentedClosing for lack of activity.
Comment #8
joelpittetFYI, still using my patch... keeps the errors away...
Comment #9
Leiph CreditAttribution: Leiph as a volunteer commentedI am getting this error as well, but during use of Rules.
i have a webform node and need to use it's title within a Rule.
* If I invoke the data through 'Data selection' everything works as expected.
* If invoke the data though 'Direct input mode' and use the token [webform:title] the error occurs.
In comment #3 Dan says "But webform_client_form also uses form_load_include to include webform.components.inc, so the patch in #2 should not be necessary."
My error message says
Fatal error: Call to undefined function webform_component_parent_keys() in ...drupal/sites/all/modules/webform_charts/webform_charts.tokens.inc on line 41
I assume that this call do not invoke
form_load__include
thus thewebform_component_parent_keys
is never defined.