Javascript error when webform block and views_exposed_filter are present on the same page

Created on 11 May 2024, 6 months ago
Updated 13 June 2024, 5 months ago

One of my webforms, a block webform, had failed after upgrade from d8 > d10. I have the typical (you need to enable your browser javascript...)

After some tests I enable the form_id visualization and I realize that 2 forms are shown, one (the webform block) with Antibot enabled and other (due a search api box) with views_exposed_form antibit disabled. So I add this form to the enabled list and then I can use my webform again. The final status was:

Antibot (views_exposed_form): enabled
Antibot (webform_submission_formulari_de_contacte_node_2_add_form): enabled

I'd like to report it here because:

1) I think it's a bug (at least, a usability bug)

2) Someone can get help with my "finding"

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇶Caribbean Netherlands calbasi Catalonia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @calbasi
  • 🇧🇶Caribbean Netherlands calbasi Catalonia

    Finally, it seems my issue is still around. I get it only on Production site, not in DEV site. I thought it could be due to js aggregation (because DEV refresh cache, etc), but disabling JavaScript aggregation doesn't solve my issue

  • 🇮🇪Ireland asirjacques Dublin

    Hi Calbasi, it looks like this is a usability bug. The feature Display form id in order to show which forms are enabled with antibot is a bit flawed.

    The function _webform_antibot_enabled get the list of forms from antibot config and if you add the webform_submission_formulari_de_contacte_node_2_add_form then it does not run into this function antibot_webform_submission_form_alter. It's not a big issue because it will still run this function antibot_protect_form in both cases but the integration with Webform could be improved.

    May be when the flag is set the config for antibot should be updated as well....

    In the end, if you want to enable antibot for webform it's better to only enable in the Third party settings section of the webform and not in antibot config. Confusing? Yes.

    Hope it helps.

Production build 0.71.5 2024