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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mahapatra.tusar created an issue. See original summary.

mahapatra.tusar’s picture

If anyone have solutions please help me.

Liam Morland’s picture

That error message is generated by Webform. Try disabling Webform Validation and see if the message still appears.

Liam Morland’s picture

Assigned: mahapatra.tusar » Unassigned

When you set your name as the Assigned person, that means you are taking responsibility for fixing the problem.

mahapatra.tusar’s picture

This 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.

Liam Morland’s picture

Status: Active » Postponed (maintainer needs more info)

Webform 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.

mahapatra.tusar’s picture

You are saying correct, but Webform Validation module is required for here. Including this particular module how to rid this issue?

Liam Morland’s picture

If 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.

Liam Morland’s picture

Status: Postponed (maintainer needs more info) » Fixed

If you need more help, please re-open and provide details.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Altcom_Neil’s picture

Hi,

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

Liam Morland’s picture

Version: 7.x-1.10 » 7.x-1.x-dev
Category: Support request » Bug report
Priority: Major » Normal
Status: Closed (fixed) » Needs review
akosipax’s picture

I believe the problem is occurring when the webform is displaying the preview page before submission.

I am getting this error message as well but we do not have a preview page before submission.

dureaghin’s picture

I'm getting this error message too and I'm not using the preview page.

Liam Morland’s picture

Does the patch fix it?

akosipax’s picture

No, the patch does not fix it.

mkdok’s picture

Hi 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.

Liam Morland’s picture

Thanks for the patch. I will be able to review it when I get back from vacation.

maduko’s picture

Applied the patch and I do not see the error in my logs.

But.... I also don't seem to be validating the hidden field.

selinav’s picture

I've the last version of webform and I don't use webform conditionnal and I've the same problem on multi page form.

Liam Morland’s picture

Hidden fields are not supposed to be validated. They ought to have a NULL value once the form is submitted.

selinav’s picture

I've not created hidden fields but I have the honeypot module. Is that the module may be responsible?

sah62’s picture

I haven't seen any errors since applying the patch described in #17.

Liam Morland’s picture

Title: WebformConditionals::componentVisibility called prior to evaluating a submission. » Ensure executeConditionals() has been called before evaluating WebformConditionals::componentVisibility

  • Liam Morland committed be7a712 on 7.x-1.x authored by mkdok
    Issue #2630448 by mkdok: Ensure executeConditionals() has been called...
Liam Morland’s picture

Status: Needs review » Fixed

Thanks very much!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.