Hi all,
On the latest alpha6 of webform 7.x-4.0, I am getting the following error:
PHP Fatal error: Call to undefined function webform_component_property() in drupal/sites/all/modules/webform/webform.module on line 2333
This occurs when I click the "View" button from /node/%/webform-results, i.e. /node/%/submission/%. I can get to the /node/%/submission/%/edit page ok, but the "Re-send Emails" button also produce the same error noted above.
The form in question is a simple form with a text field for name, a select list for "how do you want to be contacted" with options for phone or email, an email field, a phone field, and a text area. I then have conditions in place to hide the email field if "how do you want to be contacted" is set to phone, and to hide phone if it is set to email.
In order to troubleshoot, I built a test form just like the form above, one field at a time. The view button always worked for each field as I added them and made a test submission. However, as soon as I added the conditions, I could no longer click the view button without that error occuring. I then went back and removed the conditions, and the view button worked fine again. Since the phone field is being supplied by the "webform_phone" module, I decided I'd just make all of the fields simple text fields (except for the select field) to try to eliminate that as the cause. It didn't seem to matter - as long as I had put those conditions on the form, I could no longer view the submission. As soon as I take the conditions back off, the view button worked fine.
Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | webform_undefined_webform_component_property-1821422.patch | 450 bytes | quicksketch |
Comments
Comment #1
quicksketchHi there, thanks for the report! I think this is a bug in Webform. Oddly I don't get the same error when viewing submissions myself, but I can see how this would happen. We're not including the webform.components.inc file before rendering, so in some situations a "function not found" error may occur, like you're experiencing. This patch should fix the issue, could you try it out and see if it works for you?
Comment #2
bancarddata commentedand thank you for the quick and excellent support - Patch worked great!
Comment #3
jlea9378 commentedI was also experiencing this bug, and the patch appears to have worked perfectly in resolving it.
Comment #4
bjcooper commentedAlso mentioning that I had the same error and that the patch was effective. I got the error out of the blue for some reason, after using webform without problems for several months. All better now.
Comment #5
bjcooper commentedWoops, didn't mean to change the issue status. Setting it back.
Comment #6
SpenserJ commentedAnother confirmation that this patch solves the problem. @quicksketch, is there anything else that needs to be done before this is committed?
Comment #7
quicksketchI've just been busy with a lot of other projects, sorry for the delay. Committed patch in #1 to the 7.x-4.x branch.