An AJAX HTTP request terminated abnormally During auto complete text box in Drupal

September 09, 2014


The Error

When i try to enter anything into autocomplete textbox, it gives me the following error (Fig:01)

Ajax HTTP Request Error
Figure 01: Ajax HTTP Request Error

The solution: Update <?php$base_url?> in settings.php file

Recently i am working on a Prject where masquerade Module is used to swith from one user to another. But when i try to enter username in textbox (Fig:02), it produce an error "An AJAX HTTP request terminated abnormally"

Ajax HTTP Request Error

This first solution in my mind was : "Clear my cache". So error has gone. But after sometimes or next day i faced same problem again. Then i google it, go here and there and tried so many solution. But the following solution works for me.


The Best Solution

Double check your base_url in settings.php file.
If your .htaccess file redirects to the <?php<a href=">">[/geshifilter-code] version of your site and the <?php$base_url?> is <?> (or vice versa), you may run into AJAX errors. I just found this same problem on my site and fixing the base_url worked. You just need to copy url from browser, , paster somewhere around <?php$base_url?> and match. If you found anything different, adjust your <?php$base_url?> variable. You are done.