Upon entering a username and password (whether it is valid or not) and clicking Login, I frequently get a popup with this message:

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: https://mysite.com/modal_forms/ajax/login
ReadyState: 4

At first, I thought it had to do with the secure login module. But then it reappeared later while the module was still disabled. This problem may still have something to do with SSL, however. I need to test longer.

Later, I thought it was happening when the user is already logged in. From my experience, when opening a fresh browser window, if you go to the home page and you are already logged in, it will not appear as such until you actually go to /user, at which point it will just show you logged in and after that the admin menu shows up, etc. So if I have a cookie that is authenticated, it's like it is not reading it until I hit /user first. Thus the login doesn't work and produces the above AJAX error, probably because a login is not really required. It seemed like this was the case, but then after awhile I got the error again when I was not logged in.


bancarddata’s picture

Title: AJAX errors with secure login » AJAX errors with already logged in users
Component: Code » Miscellaneous

Changing title

bancarddata’s picture

Issue summary: View changes

Found out the problem is not with the secure login module but rather with already logged in users.

bancarddata’s picture

Title: AJAX errors with already logged in users » An AJAX HTTP request terminated abnormally
m.carrick’s picture

Can someone please tell me how to fix this? Is there some way where I can simply disable the error?

bancarddata’s picture

I have not figured out a way to fix the problem. I thought many times I had found a correlation with another module, but then the error pops up again later on. Perhaps we can get together to figure out if we have any common aspects to our installations that might clue us into what is causing it. Do you use memcache, APC, or any other kind of aftermarket caching? I haven't explored that side of things, but it is possible the problem lies there somewhere.

Patricia_W’s picture

Component: Miscellaneous » Code

I'm having this error using tags. As soon as I enter a character I get this error. The dialog box pops up for each character I enter. I am using the taxclouds module but probably this is something to do with taxonomy.

mfoda’s picture

Do you have remember me installed? That turned out to be the source of the problem for me.

maen’s picture

Same for me. I assume there's a problem with ssl configuration. (Secure pages) Looing for a resolution...

siretfeL’s picture

Version: 7.x-1.0 » 7.x-1.2

Definitely a problem when using ssl/https and enabled secure login for login form.

With secure login enabled option for login form, it gives an error with: "Path: https://mysite.com/modal_forms/ajax/login"...disabling the option gives the "correct" path: "Path: http://mysite.com/modal_forms/ajax/login" which works...

This only happens when calling the modal (e.g. through a login link) from plain http address. If user is already in https address, the modal works ok as far as i know.

Looking a solution probably through secure login (it seems to have also a "bug" when disabling e.g. protection of login form, it still shows enabled although is disabled actually), maybe login destination,...

hoesi’s picture

The quick fix for me, to have things play nice with securelogin, and make sure users were always on a secure page when being presented with the login form, was to add an option that disables Modal forms for links when the user is browsing a non-SSL/HTTPS page. In other words; when the user is on an "insecure" page and clicks a login link, they are sent to the normal login page (which is then redirectded to HTTPS by securelogin). When the user is browsing the secured version of the site, for an example after going to a secured checkout page on an e-commerce site, clicking a login link opens a modal and keeps them on the same page. It's certainly a compromise, but works adequately for my use. Thought I'd mention it here in case you still need some form of work-around.

Relevant patch can be found here: #1914084: Additional activation option for HTTPS

Mo Omar’s picture

Hi Patricia_W,
How did you fix this issue? I have the same exact issue.

selfsimilar’s picture

Same issue here.

selfsimilar’s picture

I'm in the same boat as #8 - secure login module works if you start on a secure page. This is definitely a cross origin issue and I'm sure there's a way to whitelist http and https traffic for each other using response headers, but I'm not sure if that should be in a new module, or a patch for an existing module.

My workaround was to add this to my .htaccess

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # Force <front> to ssl for modal use of secure log in module.
  RewriteRule http://www.example.net/^$ https://www.example.net [R=301,L]

Ideally I'd only do this for anonymous users, but this will definitely help my server since I won't have to push all traffic over https.

navoff’s picture

I'm getting this error from an installation on my local machine (i.e. localhost/drupal -- I'm still in the process of developing the website before moving it to a corporate machine and taking it live). I tried the patch mentioned in comment 9 above: https://drupal.org/node/1440716#comment-7053422 (used the one listed here: https://drupal.org/node/1914084#comment-7052332) but it did nothing to help. On the plus side, it's just the login request that does this (from a link created in the page.tpl.php file). The Create new account and Request new password links in the login block work just fine. My goal was to remove the login block and just have the link at the top of the page template. In my case, regardless of whether setting the login link to http or https, I still get an error. When I test the page in I.E. 9 I get an additional piece of information in the error message of Status Text: No Transport.

navoff’s picture

Status: Active » Fixed

Found the problem. It was in the URL definition. Once I corrected it, it worked like a charm. Here's what I used to get it to work:

<?php global $user; if (!$user->uid) { print "<a href='".$base_path."user/login' >Login</a>"; } else { print l("Log Out","user/logout");  } ?>

Would have been nice if there was some kind of error message either in the popup or the error logs that would give me a clue of what the actual problem was.

wolfmarter’s picture

@navoff. I am having the same problem. It seems though that the user is being created and on the callback the ajax error appears. Where did you put the code for the URL definition?

Is it possible to redirect to another page after login?



Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Editing to more generic description since I cannot seem to find a consistent cause

ankitgupta13’s picture

Same issue

but in my site i have not installed secure login
in login time same issue occurred the ajax popup

how to i fixed it

SebaZ’s picture

I think it's a problem with X-Frame-Options as I mentioned there