Hopefully someone will be able to help me out here, this is driving me mad and threatening to ruin this project entirely. I'm at my wits end with it now and beginning to wish I hadn't moved from D6 to D7 so quickly.

I have created a few views, I've used them a lot in the past so I know how they work (or should work), but this has me stumped.

I was using views to retrieve data and create a custom menu block for me, I went to continue working on it today and now get the following error message every time I try to update a view, and since update doesn't work, you can't save anything. This is a complete dead-stop for me, I can't do a thing until I get this fixed. Full error is below;

"The page at [domain] says;

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: http://www.domain.com/dev/?q=admin/structure/views/ajax/rearrange/portfo...
ReadyState: 4"

Please, if anyone has a clue what is going on, or any idea how to fix it, I would be eternally greatful.



PS - Hopefully this is in the right place.

PPS - I have looked on both google and the drupal forums and couldn't find anything definitive to help me.


markosaurus’s picture

I went for a coffee and a smoke, came back and it was good as gold. No idea what happened at all.

bastiansalmela’s picture

well, coffee and a smoke fixed it for me too.. but more permanent solution would be better ..

thanks. :)


jane.trimmer’s picture

This problem cropped up for me today in Views 3 on Drupal 7. As I've had no problems up till now, I knew it nothing to do with any settings. As I don't smoke and limit my caffeine intake, I had to think of a different solution. I had been working in Chrome and changed to Firefox. No problems at all!

broxen’s picture

I have this exact same problem and have been searching for two days for a solution.

No matter how many times I go for a smoke, it doesn't seem to work =P

All my views were working previously on the live site, and work fine on a test site, but now they fail on the live site with this very AJAX error.

For the life of me I can't figure out why, both installs are running the same version of Drupal, Ctools, Date, Views and really every module b/c I installed them side-by-side.

I also checked a few other random things: PHP ver is the same and php memory_limit the same...

I'm outta ideas.


broxen’s picture

I have gotten around this temporarily by disabling JavaScript in views under the Tools tab.

I hope if others are searching for this same problem they'll come across this (temporary) solution.


broxen’s picture

In case anyone stumbles upon this, I found the solution to _my_ particular problem:

we had changed .htaccess to redirect all URLs and include WWW.

however we never changed $base_url in settings.php to include WWW, and it was creating AJAX errors all over the site. Adding the prefix to our $base_url fixed all errors immediately.

Hope someone gets some use out of this.


mortona2k’s picture

Thank you broxen, you are now fixen in my mind. You just saved me hours of frustration.

The other Andrew Morton

tiltedlistener’s picture

Thank you as well. Solved a bunch of problems for me.

danielw’s picture

fixed it for us

tac11tac’s picture

Not sure how to fix it, yet.

Site setup like...

both point to the live site in /livesite. Issues with ajax when using the www.

I would like both to work, or to make the switch to xyz.com without any fuss for the user.

Devsite is a subdomain

devsite.xyz.com with files living in /devsite. No ajax issues.

I'm new here... so any .htaccess or settings.php suggestions would be appreciated.



strands’s picture

Adding www to $base_url in settings.php fixed it for me too.
Thanks a lot. ..

joancatala’s picture

Thanks very much. I haven't try that. I just disable the javascript under Views (in settings/Advanced tab) and that worked fine.


davidneedham’s picture

That fixed it for me too! The key for me was

...in settings.php.

:-) FWIW, setting it in .htaccess didn't help.

David Needham
Agency & Community Training Manager | Pantheon

kristin.e’s picture

Unfortunately, $base_url in settings php did not work for me. I'm still getting this error and what's more my views are not displaying galleries with jQuery functions either. Any other suggestions welcome....

pav’s picture

This is probably a silly question, but I'm pretty new to this.

How do you adapt this solution for localhost/my-site? I've been stuck on this for hours (I don't want to disable javascript). Help would be massively appreciated.



StockHunter’s picture

Worked for me, thanks!

robwithhair’s picture

Thanks for posting this. Dont know if I'd ever have figured that one out!

joecanti’s picture


Fixed it for me...Many thanks Broxen!

Sacha00Z’s picture

Worked for me, but in the opposite direction. My htaccess strips the www, so my base_url also needed to match

dzon’s picture

Thanks for sharing

Halffull’s picture

I had www in my base_url, but did nothing with it in .htaccess... removing the www from base url solved the problem. In Views 3

Aeternum’s picture

I managed to fix this by clearing the Views cache

Views --> Settings --> Advanced --> Clear Cache

markosaurus’s picture

The way this was reporting back for me I had thought this was probably an unescaped quotation mark within the sql query which was being run from the views interface, but now I'm not so sure.

Hopefully, if the $base_url fix works then that will be an end to the issue, I would assume updating would also fix this.

celebi13’s picture

Thank you very much for information.Drupal love you: D

tommann’s picture

That worked for me as well.

apostrophes’s picture

thanks alot

HunterElliott’s picture

Broxen, wanted to thank you for your $base_url info - that fix worked for me.

builtneat’s picture

The problem arises most often in Chrome, all you need to do is log out from drupal and then log back in and that should clear the session and all should be working fine again.

MrPeanut’s picture

I have base_url set to http://www.mydomain.com, htaccess forces www.mydomain.com, cleared all caches (via the admin interface and via phpmyadmin) and the sessions table, and I'm still having the problem.

The error I get happens in particular when trying to do anything with authorize.php (e.g. installing a module, updating, etc.):

An AJAX HTTP request terminated abnormally. Debugging information follows. Path: https://www.mydomain.com/authorize.php?batch=1&id=71&op=do StatusText: ResponseText: ReadyState: 4

From there, I get four more errors:

  • Notice: Undefined index: log in update_authorize_install_batch_finished() (line 235 of /drup/modules/update/update.authorize.inc).
  • Warning: Invalid argument supplied for foreach() in update_authorize_install_batch_finished() (line 235 of /drup/modules/update/update.authorize.inc).
  • Notice: Undefined index: log in update_authorize_install_batch_finished() (line 276 of /drup/modules/update/update.authorize.inc).
  • Notice: Undefined index: tasks in update_authorize_install_batch_finished() (line 277 of /drup/modules/update/update.authorize.inc).
  • Installation failed! See the log below for more information.

Firebug gives me this error:

"NetworkError: 403 Forbidden - https://www.mydomain.com/authorize.php?batch=1&id=72&op=do"

ibeb’s picture

I've the same problem. In my case the reason was a redirect in .htaccess from http://www.mysite.de to http://mysite.de. I've adapted the $base_url in the settings.php and now I can install a module etc. again :o)

NoahJ’s picture

I had the exact same problem - module install with same PHP errors and a 403 to top it off, though what caused it for me was that I configured my site to use some mixed-mode SSL settings...

I'm redirecting all requests to http://mydomain.com (without WWW), and my base_url is set to http://mydomain.com.

I was requesting the batch using HTTP, (http://mydomain.com/authorize.php?batch=1&id=71&op=do) but because I wasn't logged in using HTTP, access was denied. I changed it to (https://mydomain.com/authorize.php?batch=1&id=71&op=do) and it worked like a charm.

At least, I think that's what caused it. I'm a bit fuzzy on how SSL works.

sittard’s picture

It's also worth checking if your hosting provider is running ModSecurity. Our domain was triggering rule #340149. I got the server admin to white list the domain and this has fixed the issue for us.

defconjuan’s picture

MaxRequestLen sometimes gets lowered as a result of server/module updates. Also, adding modules that add to the request length can also introduce this problem. This is why disabling modules can sometimes "fix" the problem.

See http://drupal.org/node/1015938#comment-7412202 for a solution that involves updating your vhost file, eg:

<IfModule mod_fcgid.c>
  # 50MB
  MaxRequestLen 52430000

Or try switching from FastCGI to mod_php or php-fpm (if you're using FastCGI).

josephlau’s picture

I have a similar problem like this.

When I disable or switch off "Clean URL", the problem disappears.

But, I don't know why and don't know how to fix it permanently.

Can anyone suggest?

Chris Kenny’s picture

Somewhere along the line I modified my /site/default/settings.php but elsewhere (.htaccess) I put in a redirect to not use www. What I put into the settings.php included the www. in front of my domain name. The site worked pretty well until I had to do an update. It choked towards the end where you do the database update script. Still the site worked... Then I wanted to install a new module. and had to resort to a manual install. Difficult, but possible. I had to do it again and decided to get to the bottom of it.

Now my .httaccess redirect agrees with my settings.php and I can install modules with in Drupal and my database update finally completes without errors.

* See the .htaccess file for more information.
* # To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment the following:
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] <--------------------remov hash from this line and
RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301] <--------this line in .htaccess for no www.

* It is not allowed to have a trailing slash; Drupal will add it
* for you.
$base_url = 'http://example.com'; // NO trailing slash! <-- This is the line I had to fix, removing www.

I hope this helps someone one day.

samsterlin’s picture

Great Work.

sea_drupal’s picture

encounter the same issue after I did some modification of .htaccess and setting.php, because I need to activate the https.

think it might be due to the url in .htaccess and setting should be in sync. for my case, I was configuring "https", so I need to add below according to the ISP guidance

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://xjptzz.com/$1 [R=301,L]

then in setting.php below, the first line is added, which got problem of AJAX, then I removed the www ( in second line) and it is working now.
#$base_url = 'https://www.xjptzz.com';
$base_url = 'https://xjptzz.com';

Thanks for everyone contribution and then I can resolve this issue very fast, here it just share my experience.

daften’s picture

In my case, it was an ad-blocker producing the error. It blocked the ajax calls. :)

thejamesjones’s picture

Yep, that is what did it for me to. Thanks for posting about this, I was not even thinking that direction. Disabled ABP for my site and no more errors.

joshuautley’s picture


Thank you for this. I've run into it in the past and neglected to write down the solution should it occur again. This fixed the issue.

I had copied the dev URL with www into my settings.php file and forgot that I have my .htaccess file set to remove the www.

Josh Utley, President & CEO
Intrepid Network Inc. | Multimedia Services & Business Solutions

"Our mission is to provide a more personable multimedia service along with the highest quality business solutions."

Kipp Elliott Watson’s picture

I got this error for a reason that had nothing to do with the base_url. I tried uploading an image to a content type I had created with an image field. The problem was a permissions problem for the image I was trying to upload. Once I gave read and write permissions for the image, everything worked fine.

edboost’s picture

We've been swarmed with Ajax problems (but I know that the base URL is ok because I've had that problem before!).

Finally, looking over this thread for the millionth time, I noticed Aeternum's suggestion:

I managed to fix this by clearing the Views cache

Views --> Settings --> Advanced --> Clear Cache

Fingers crossed, but this seems to have fixed our issue.

I'm grateful.

And it's an easy thing to try.

sgroundwater’s picture

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /admin/structure/views/view/foo/preview/page/ajax
ReadyState: 4

I found this thread searching the error I recieved above. I'm building out a D7 site with a lot of moving parts (modules). When I hit the error I was worried that I had some kind of javascript/jQuery issue.

For me, I was throwing the error while updating the preview of a poorly configured view.

In the view I had:
Format: Unformatted list | Settings
Show: Content | Teaser

Changing "Show: Content" to "Show: Fields", for an Unformatted list was my fix.

Thanks to everyone in the thread for the other places to check while troubleshooting.

mhmoodz@me.com’s picture

I confirm your method on D7, The only difference I have is that I changed it to "show entity". I am new to drupal so I don't know if that option is there because the view is showing taxonomy terms.

Thanks for the solution :)

umesh sharma’s picture

same issue i got in my newly made websites where all type of detail and latest version of security update updated . after that its not worked.