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

| Published Date: 15 Sep 2014 | Last Updated Date: 04 Sep 2017
Total Reads: 13,618 | Last Visit: 21 Sep 2017 10:11:56 PM

The Error

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

Figure 01: Ajax HTTP Request Error

The solution: Update $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"

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 www.yourdomain.com version of your site and the $base_url is yourdomain.com (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 $base_url and match. If you found anything different, adjust your $base_url variable. You are done.



Post new comment

The content of this field is kept private and will not be shown publicly.
Max length 128 characters
Enter the characters shown in the image.

About This Mania

Hasan Hafiz, Blogger at web mania ltd (www.webemania.com). He has more than 5 years experience in web development platform. He worked as a Sr. Software Developer at Canadian based outsourcing software firm, Lead Developer at countries top most VOIPswitch development company and Sr. Software Engineer at USA based outsourcing software firm . His expertise areas are PHP, MySQL, CSS, Javascript, JQuery, HTML, XML and MVC Framework Codeigniter. He has been along with Drupal from more than 4 years. You may call him Drupal Addicted.