After updating to v2.0.1, whien I visit pages with forms I get the following error:

Uncaught ReferenceError: FALSE is not defined
at Object.attach (antibot.js?rjw3sd:19:38)
at drupal.js?v=9.4.8:27:24
at Array.forEach ()
at Drupal.attachBehaviors (drupal.js?v=9.4.8:24:34)
at drupal.init.js?v=9.4.8:29:12
at HTMLDocument.listener (drupal.init.js?v=9.4.8:17:7)

In file js/antibot.js in line 19 FALSE should be false (lower case letters):

drupalSettings.antibot.human = FALSE;

As a result all protected forms, including login form don't work, locking the user out.

Comments

plessas created an issue. See original summary.

plessas’s picture

Issue summary: View changes
john.glynn.davies’s picture

Similarly, the following line results in the same error. TRUE should also be written in lowercase?

// Mark this user as being human.
drupalSettings.antibot.human = TRUE;

Thanks

  • 3af0103 committed on 2.0.x
    Issue #3315677: Uncaught ReferenceError: FALSE is not defined
    
gaurav.kapoor’s picture

StatusFileSize
new132.42 KB

I have reverted the changes done in some last commits. The issue is due to automatic fixes by PHPCS.

PHPCS Warnings in Antibot

john.glynn.davies’s picture

Thanks Gaurav. I wonder if there is an issue with the PHPCS setup?

gaurav.kapoor’s picture

Most probably.

danrod’s picture

All of the PHPCS / CSPELL / PHPSTAN / ... are fixed now: https://git.drupalcode.org/project/antibot/-/pipelines/559550

And I haven't seen this issue anymore, I'll make a tagged release soon.

I'll mark this as "Fixed".

danrod’s picture

danrod’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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