User cannot login when antibot plugin is installed.

Steps to reproduce:
1. navigate to login page of your site (http://your_site_name/drupal/user)
2. provide a valid user name/password
3. click login button

Expected result:
User is logged in

Actual result:
user is redirected to antibot page with the following message:
"You have reached this page because you submitted a form that required JavaScript to be enabled on your browser. This protection is in place to attempt to prevent automated submissions made on forms. Please return to the page that you came from and enable JavaScript on your browser before attempting to submit the form again."

System info:
The following web browsers have been used for testing:
Firefox v.61.0.1 (64-bit)
Chrome v.68.0.3440.75 (Official Build) (64-bit)

Comments

mstef’s picture

Did you recently upgrade or install and not clear the cache? Are you testing with a core theme or a custom one?

2546bff7-1201-40c9-a419-4c44637f137e’s picture

I didn't upgrade nor install anything.
I tried to clear the cache and I'm also tried to use Incognito/Private browsing mode - noting helped.
I'm using a custom theme https://www.drupal.org/project/simplecorp

mstef’s picture

So you weren't previously using it, you just installed it and this happened?

You cleared the cache from the admin ui or using drush?

Have you tested with a core theme? My guess is perhaps your custom theme has a template for the user login and isn't rendering what Antibot is adding. Is your site live so I can see it?

2546bff7-1201-40c9-a419-4c44637f137e’s picture

It was working for some time and then stopped - perhaps the hoster updated some modules?
I don't have access to admin ui roght now.
I have only FTP/SSH access.
Is there any way to uninstall/disable antibot having only FTP/SSH access?

The login form renedered on my site:

<form class="antibot" action="/drupal/antibot" method="post" id="user-login" accept-charset="UTF-8">
  <div>
    <div class="form-item form-type-textfield form-item-name">
      <label for="edit-name">Username <span class="form-required" title="This field is required.">*</span></label>
      <input id="edit-name" name="name" value="" size="60" maxlength="60" class="form-text required" type="text">
      <div class="description">Enter your  username.</div>
    </div>
    <div class="form-item form-type-password form-item-pass">
      <label for="edit-pass">Password <span class="form-required" title="This field is required.">*</span></label>
      <input id="edit-pass" name="pass" size="60" maxlength="128" class="form-text required" type="password">
      <div class="description">Enter the password that accompanies your username.</div>
    </div>
    <input name="form_build_id" value="form-kxntcYB8NChsg8SgvQnT9_9eyicTXigoL6JqU_Xb3dc" type="hidden">
    <input name="form_id" value="user_login" type="hidden">
    <input name="antibot_key" value="" type="hidden">
    <div class="form-actions form-wrapper" id="edit-actions">
      <input id="edit-submit" name="op" value="Log in" class="form-submit button small round sea_blue" type="submit">
    </div>
  </div>
</form>
mstef’s picture

Something had to change for it to stop working. Did you update or add any modules or themes?

You can install drush and use that to disable modules from the command line.

Are there any JavaScript errors on your login page?

Can you send me the URL to your login page?

Rugman’s picture

Dear Mstef,

Your attention to

https://www.drupal.org/project/antibot/issues/2981400

Even I am, still facing similar problems.

Nothing changed on my sites - THEY ARE STATIC IN NATURE with basic pages only

This is beautiful module having this issue. Please provide some way around, I even tried to login by deleting antibot folder but its not working :-(

HELP PLEASE

2546bff7-1201-40c9-a419-4c44637f137e’s picture

There is no javascript errors.
You can check login page: http://unphotoclub.org/drupal/user

mstef’s picture

It looks very much to me that you updated antibot to the new version and never cleared cache or any of the proper procedures of module upgrading.

I see the HTML for the form has changed with the new changes in 1.2 but looking at your compressed JS, it's still the old version and missing a very important change that was released in 1.2 (http://unphotoclub.org/drupal/sites/default/files/js/js_Jvd1ABl6a0r81zoR...).

mstef’s picture

You'll need to either disable JS aggregation (temporarily) or clear your caches. If you have drush, you do easily do either of these via drush.

mstef’s picture

Status: Active » Closed (works as designed)

In the future, when updating modules, be sure to follow best practices: https://www.drupal.org/docs/7/update/updating-modules

Egmund’s picture

I am also logged out from my site, buddhistisksamfund.dk with same msg - and in all browsers I have on this system even though they are running js.

How do I disable or eliminate antibot onthe server (via filemanager and phpMyAdmin in cPanel)?

Well; I simply disabled all functions in the antibot module - problem 'solved' - but issue still exist.
Is it related to Drupal update to 7.60?

Egmund’s picture

Status: Closed (works as designed) » Active
mstef’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

I am resetting the status of this ticket, since this is not an issue with the module but rather your site.

I suggested that you clear your Drupal cache as the aggregated Javascript still contained the code from the previous version of the module. Please do that now and test again.

Egmund’s picture

Sorry mstef, of course already cleared cache in advance of posting here.

I just did it again. Same result: I am logged out. What more can I possible do?

Gather maintenance of this module is 'suspended'.

mstef’s picture

No, maintenance of this module is very much active. There's almost 8,000 sites using this module; my own included. You're the only one facing this issue. As I mentioned, it's a problem with your site and not the module; as far as I can tell here.

If this is your site (http://unphotoclub.org/drupal/), the issue is still exactly what I said it was. The JS is still compressed and has not been updated: http://unphotoclub.org/drupal/sites/default/files/js/js_Jvd1ABl6a0r81zoR...

This is old JS from antibot and will not work with the new version of the module. I suspect you didn't clear caches out, or if you did, there's some other problem on your site. Perhaps purging those aggregated files may help. Start by shutting off JS aggregation.

Egmund’s picture

My site is https://buddhistisksamfund.dk

And there are (at least) two of us having this problem.

Anyway, I hope we can get it to work - it is an efficient module.
Egmund

mstef’s picture

Antibot is not enabled on your site so there is nothing I can do to help you. Let me know when it is and I'll take a look.

I also recommend trying the module with a core theme. A lot of custom themes forget to output any additional form elements that are added to the user login (or other) core forms.

mstef’s picture

Title: Antibot is blocking users login » Unable to login after updating the module
Category: Bug report » Support request
Status: Closed (works as designed) » Postponed (maintainer needs more info)
Egmund’s picture

Yes, it is indeed the theme (Mayo). Works fine with Bartic.

How do I fix it?

I will leave antibot enabled with Mayo a couple of days so You can investigate & advise.

mstef’s picture

Everything with the HTML and JS look fine. I think the problem is you have about 4 JS errors when visiting the login page. That most likely prevents Antibot from executing.

Egmund’s picture

Thank you for pointing this out mstef.

The problem is not in the theme but in the NiceMenu module. I will have to look into this - or find a replacement.

Egmund’s picture

Swiching over to SuperFish (which works w. Antibot).

Egmund’s picture

Problem solved.
nice-menu uses an old version of bgiframe (3.0.0). Switching that with newest one (3.0.1) all is fine - no more js errors.

Thanx again for your help

mstef’s picture

Status: Postponed (maintainer needs more info) » Fixed

You're welcome.

I believe that covers both sites.

For reference, be sure to clear caches after a module upgrade, check that JS aggregation is not holding on to old JS files, and check for any JS errors in the console.

Status: Fixed » Closed (fixed)

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

adrian83’s picture

Fixing JS errors caused by the theme fixed the issues I was having with Antibot. Thank you.

benjarlett’s picture

I fixed it without using drush (no access on my shared hosting) by changing $update_free_access = TRUE; in settings.php, and running updates (which clears cache I believe).

hirschg’s picture

I have actually exact the same problem. But I do not installed the NiceMenu or the library bgiframe, What can I do? Have somebody an idea for me?

mstef’s picture

Usual culprits: 1) JS errors on the page from other contrib modules or your themes. 2) Theme template for the login form not outputting all of the required elements. 3) Contrib modules that alter the login form in a less than ideal way. 4) Caches not cleared.

anybody’s picture

Same problem here. Indeed the reason seems to be a JavaScript error on the page (caused by eu_cookie_compliance).

ecj’s picture

Same issue.
Abandoning module

msypes’s picture

Is this fixed?
I've just gotten a report from a client that her site is exhibiting this same behavior.

  • Drupal 8.9.20 (Yes, we're still prepping for an upgrade to 9
  • Antibot 8.x-1.5

Both have been place for several weeks now, probably since November 2021 when D8 when EOL. I have no idea why we're suddenly getting the error now. Maybe a Chrome browser update?

adrian83’s picture

@msypes, did you check your browser's JS console for javascript errors?

msypes’s picture

@Adrian83: I haven't tested nor seen the issue yet myself. It's just report from a client whose site I maintain. She and her clients have seen it. She has temporarily removed links to the form until I can resolve the issue.

msypes’s picture

Red herring/false alarm. Sorry.
A different Javascript that happened to occur on the same page had a syntax error, and apparently broke this functionality as a side effect.

2dareis2do’s picture

I have same thing. Looking at the console I have problem with my theme js

Uncaught ReferenceError: once is not defined

adding

- core/once

as a dependency in my libraries file fixes it

anybody’s picture

@2dareis2do: This module doesn't use core/once! Also you're in the Drupal 7 branch issue here. Your issue must be from a different module!

2dareis2do’s picture

Yes that's my point.

In this case this was a missing dependency in my theme.

Apologies for any confusion.