I have the message "Call to undefined function webform_component_list()" on the page "node/18263/webform/emails" and a similar message sending the form.
I installed webform and webform_conditional modules.
The module invoke a function of "ncludes/webform.components" file, but the file is not included.
My solution is quick and dirty, I included the file.
I hope someone finds a better solution: D
Thanks
Index: webform.module
===================================================================
--- webform.module (revision 811)
+++ webform.module (working copy)
@@ -12,6 +12,10 @@
* @author Pontus Ullgren <ullgren@user.sourceforge.net>
*/
+# PB:2010/07/26 incluso il file .inc che contiene la funzione webform_component_list richiamata in questa funzione
+module_load_include('inc', 'webform', 'includes/webform.components');
+# PB:2010/07/26 FINE
+
/**
* Implementation of hook_help().
*/
Index: includes/webform.emails.inc
===================================================================
--- includes/webform.emails.inc (revision 811)
+++ includes/webform.emails.inc (working copy)
@@ -8,14 +8,14 @@
* @author Nathan Haug <nate@lullabot.com>
*/
+# PB:2010/07/26 incluso il file .inc che contiene la funzione webform_component_list richiamata in questa funzione
+module_load_include('inc', 'webform', 'includes/webform.components');
+# PB:2010/07/26 FINE
+
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | webform_undefined_function.patch | 1002 bytes | quicksketch |
| #4 | webform_filter_include_components.patch | 643 bytes | quicksketch |
| #1 | webform_include_components.patch | 1.85 KB | quicksketch |
Comments
Comment #1
quicksketchThanks, including the file as necessary is the right approach, but you probably shouldn't just be pulling in the webform.components.inc file at the top of those files, especially since using module_load_include() at the top of a file like that will break install profiles. This patch will just include the file as needed within individual functions.
Comment #2
quicksketchI've committed the patch in #1. Please reopen if the problem still exists.
Comment #3
Anonymous (not verified) commentedSorry but the problem is still present when I submit the form.
I need olso this include
Comment #4
quicksketchDoes this patch work equally as well? I think the only function we need is webform_component_parent_keys() here, so there's no need to pull in the file on every call to the filter function.
Comment #5
Anonymous (not verified) commentedI tried the solution #4, but the message I get is still:
It's strange but this is the result
Comment #6
quicksketchI've committed this patch which should guarantee that the file is pulled in when viewing any Webform form. If you're getting the problem still and running PHP 5.3 you might check your PHP configuration (see #807680: APC setting "apc.include_once_override" causes call to undefined function filefield_widget_settings_save()).
Comment #8
sorinb commentedin webform.pages.inc
- add module_load_include as bellow:
function webform_configure_form($form, &$form_state, $node) {
module_load_include('inc', 'webform', 'includes/webform.components');
Thanks,
S.