How to resolve “An AJAX HTTP request terminated abnormally” error on Drupal?

As a regular Drupaller I come across quite a few errors now and again. Fortunately (although I get this one quite a bit in views) I do know what I am doing wrong. It is all down to the `$base_url that you have set in settings.php. If you have set it (uncommented the # from http://www.example.com) and you attempt to use it from a non authenticated domain you will get this error. For example if you have set the $base_url as “http://www.mydomain.co.uk" but you are using views from the domain “http://mydomain.co.uk" then you will encounter problems. Simple change the url to the correct one!

I have written out the instructions in a process format for those looking for a walkthrough.

  1. Open /sites/$new_url/settings.php in your favourite text editor.
  2. Find this line # $base_url = 'http://www.example.com';
  3. Add the url of your domain in place of example.com. [http://www.domain.co.uk]
  4. Save the file.
  5. Clear cache (either from drush or Configuration > Performance > Clear Cache) and try again.
  6. Now make sure that you don’t use the incorrect domain!

Happy Drupalling.