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.
Hi,
I have created one webform with many fields.
Such of fields are Email & Confirm Email.
I have installed Webform validation module (https://www.drupal.org/project/webform_validation) and validate Email is Equal values of Confirm email.
But after submit a form in "Recent log messages" its showing error.
Error is "WebformConditionals::componentVisibility called prior to evaluating a submission."
How to rid this issues? If any solutions please help me.
Comment | File | Size | Author |
---|---|---|---|
#17 | webform_validation_componentVisibility_error_fix-2630448-17.patch | 1.09 KB | mkdok |
Comments
Comment #2
mahapatra.tusar CreditAttribution: mahapatra.tusar as a volunteer and commentedIf anyone have solutions please help me.
Comment #3
Liam MorlandThat error message is generated by Webform. Try disabling Webform Validation and see if the message still appears.
Comment #4
Liam MorlandWhen you set your name as the Assigned person, that means you are taking responsibility for fixing the problem.
Comment #5
mahapatra.tusar CreditAttribution: mahapatra.tusar as a volunteer and commentedThis is requirement for client. I will do this job by other procedure, but how to make it by webform conditional(https://www.drupal.org/project/webform_conditional) module.
Comment #6
Liam MorlandWebform Conditional has been merged into Webform as of version 7.x-4.0-alpha2 and should no longer be installed.
The error message you reported is generated by Webform. Try disabling Webform Validation and let me know if the message still appears.
Comment #7
mahapatra.tusar CreditAttribution: mahapatra.tusar as a volunteer and commentedYou are saying correct, but Webform Validation module is required for here. Including this particular module how to rid this issue?
Comment #8
Liam MorlandIf the problem still happens when Webform Validation is disabled, then the problem is with Webform and the question should be put into the Webform queue.
Comment #9
Liam MorlandIf you need more help, please re-open and provide details.
Comment #11
Altcom_Neil CreditAttribution: Altcom_Neil commentedHi,
We were getting the same error after updating to Drupal 7.43, Webform 7.x-4.12, and Webform Validation 7.x-1.11
I believe the problem is occurring when the webform is displaying the preview page before submission.
In webform/webfrom.module webform_client_form_validate(), before attempting to do any validation, the function checks whether the form submission is taking place on the preview page. In webform_validation/webform_validation.module webform_validation_validate() this is not checked for before carrying out the validation checks.
This means that WebformConditionals::componentVisibility() is called before WebformConditionals::executeConditionals() has been called as no other code has run to set it up.
Attached is a patch that adds the same check from webform_client_form_validate() before attempting any validation.
Cheers, Neil
Comment #12
Liam MorlandComment #13
akosipax CreditAttribution: akosipax commentedI am getting this error message as well but we do not have a preview page before submission.
Comment #14
dureaghin CreditAttribution: dureaghin commentedI'm getting this error message too and I'm not using the preview page.
Comment #15
Liam MorlandDoes the patch fix it?
Comment #16
akosipax CreditAttribution: akosipax commentedNo, the patch does not fix it.
Comment #17
mkdok CreditAttribution: mkdok at Internetdevels, Drupal Ukraine Community for Drupal Ukraine Community commentedHi all,
I think that I have already fixed this issue. Problem was in that the form was retrieved from the form cache and the conditionals might not
have been executed yet.
Please review my patch.
Comment #18
Liam MorlandThanks for the patch. I will be able to review it when I get back from vacation.
Comment #19
maduko CreditAttribution: maduko commentedApplied the patch and I do not see the error in my logs.
But.... I also don't seem to be validating the hidden field.
Comment #20
selinav CreditAttribution: selinav commentedI've the last version of webform and I don't use webform conditionnal and I've the same problem on multi page form.
Comment #21
Liam MorlandHidden fields are not supposed to be validated. They ought to have a NULL value once the form is submitted.
Comment #22
selinav CreditAttribution: selinav commentedI've not created hidden fields but I have the honeypot module. Is that the module may be responsible?
Comment #23
sah62 CreditAttribution: sah62 commentedI haven't seen any errors since applying the patch described in #17.
Comment #24
Liam MorlandComment #26
Liam MorlandThanks very much!