Hello,

Webform Ajax does not work with and Antibot. When the form is submitted the following error shows up:

Uncaught TypeError: Cannot read property 'top' of undefined
    at Drupal.AjaxCommands.webformScrollTop (webform.ajax.js?v=8.3.3:166)
    at Drupal.Ajax.success (ajax.js?ory09m:155)
    at Object.success (ajax.js?v=8.3.3:505)
    at Object.t.success (jquery.form.min.js?v=3.51:11)
    at i (jquery.min.js?v=2.2.4:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?v=2.2.4:2)
    at z (jquery.min.js?v=2.2.4:4)
    at XMLHttpRequest.<anonymous> (jquery.min.js?v=2.2.4:4)

Thank you

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gge created an issue. See original summary.

jrockowitz’s picture

Project: Webform » Antibot
Version: 8.x-5.x-dev » 8.x-1.x-dev

The problem is that Antibot is replacing the form's #prefix when it should be appending the antibot message to the form's #prefix.

Please see the attached patch.

jrockowitz’s picture

jrockowitz’s picture

Status: Active » Needs review
mstef’s picture

Status: Needs review » Needs work

I think I'd prefer to have antibot prepend rather than append. Can you test if that works as well, and if so, update the patch please?

jrockowitz’s picture

Status: Needs work » Needs review
FileSize
759 bytes

Prepending works fine.

gge’s picture

Thank you for fixing this! It works as expected.

  • mstef committed 5ce3d8f on 8.x-1.x authored by jrockowitz
    Issue #2888403 by jrockowitz: Webform Ajax and Antibot not working...

  • mstef committed 017b079 on 7.x-1.x
    Issue #2888403 by jrockowitz: Webform Ajax and Antibot not working...
mstef’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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