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.
I, i found an error 500 when create a new webform component. in dblog i found this:
"Notice: Undefined index: extra in webform_conditional_form_webform_component_edit_form_alter()"
Comment | File | Size | Author |
---|---|---|---|
#19 | webform_conditional-improve-handling-2576731-12-7.x.patch | 2.51 KB | dsouchay |
#5 | webform_conditional_error_500-2058643-4.patch | 1.32 KB | COBadger |
Comments
Comment #1
tedbowI don't think this would Module cause the problem.
Please re-read instructions here: https://drupal.org/node/add/project-issue/webform_conditional
In addition to instructions there
Turn of this module and confirm the problem no longer happens
Comment #2
tedbowneed answers to #1
Comment #3
COBadger CreditAttribution: COBadger commentedtedbow, I had the same error pop up - disabled webform_conditional and no longer got the error message
message is:
Notice: Undefined index: extra in webform_conditional_form_webform_component_edit_form_alter() (line 25 of /[path]/sites/all/modules/webform_conditional/webform_conditional.module).
also get:
Notice: Undefined index: value in _webform_conditional_get_all_components() (line 662 of /[path]/sites/all/modules/webform_conditional/webform_conditional.module).
I have webform 7.x-4.0-beta1 installed - not sure if that's helpful in chasing this down.
Comment #4
COBadger CreditAttribution: COBadger commentedCreated patch webform_conditional_error_500-2058643-4.patch to correct error:
Notice: Undefined index: value in _webform_conditional_get_all_components() (line 662 of /[path]/sites/all/modules/webform_conditional/webform_conditional.module).
Comment #5
COBadger CreditAttribution: COBadger commentedUpdated patch to remove a debugging line
Comment #6
emi_bcn CreditAttribution: emi_bcn commentedHello there,
I can confirm error 500 exists due a PHP error on
webform_conditional_form_webform_component_edit_form_alter
function at filewebform_conditional.module
. It's because does not exists the value$form['conditional']['extra']
, nor none of its descendants, as needed by the declarationsIt might be because some modules incompatibilities.
Comment #7
jibranI have the same issue on the site. Here is the patch for #6.
Comment #8
tylergbass CreditAttribution: tylergbass commentedImplemented the patch from #7 on my dev machine and it resolved my issue when attempting to edit webform components. Thanks!
Using webform_component 7.x-1.0-beta2
Comment #9
Yoran Scholiers CreditAttribution: Yoran Scholiers at EntityOne commentedI can confirm that patch #7 fixes the problem.
Using webform_component 7.x-1.0-beta2
Comment #10
AaronBaumanConfirm #7 fixes the problem
defensive programming FTW
RTBC
Comment #11
emi_bcn CreditAttribution: emi_bcn as a volunteer and commentedWell, somebody did some changes but they are not enough. This is my proposal at
webform_conditional_form_webform_component_edit_form_alter
(this works for me and does not throws any warning nor error):Comment #12
vulpcod3z CreditAttribution: vulpcod3z commentedI can confirm this fix, Drupal v7.32 || Webform 7.x-4.12 || Webform conditional 7.x-1.0 (with function replacement)
Comment #13
ymeiner CreditAttribution: ymeiner commentedcreated a patch from @emi_bcn comment. worked for me.
Comment #14
ymeiner CreditAttribution: ymeiner commentedOr the file i really created.... sorry...
Comment #15
ymeiner CreditAttribution: ymeiner commentedComment #16
joelpittet#7 was RTBC, nobody has tested the new code so setting to "needs review"
Comment #17
yang_yi_cn CreditAttribution: yang_yi_cn commentedit now passes /node/***/webform/components/** (the component edit screen). However, when you save, it still throws warnings:
Notice: Undefined index: conditional_values in webform_condtional_component_edit_submit() (line 72... webform_conditional/webform_conditional.module)
Notice: Undefined index: conditional_values in webform_condtional_component_edit_submit() (line 73... webform_conditional/webform_conditional.module)
Comment #18
yang_yi_cn CreditAttribution: yang_yi_cn commentedrolled another patch including the warning fixes (and including the old patch).
Comment #19
dsouchayAnother solutions for this error... worked for me.