diff --git a/misc/ajax.js b/misc/ajax.js index bb4a6e1..80a7aed 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -476,7 +476,10 @@ Drupal.ajax.prototype.getEffect = function (response) { * Handler for the form redirection error. */ Drupal.ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { - alert(Drupal.ajaxError(xmlhttprequest, uri, customMessage)); + // Similar re-roll to https://www.drupal.org/files/issues/autocomplete-1232416-17-7x.patch + if (xmlhttprequest.status >= 400) { + alert(Drupal.ajaxError(xmlhttprequest, uri, customMessage)); + } // Remove the progress element. if (this.progress.element) { $(this.progress.element).remove(); diff --git a/misc/autocomplete.js b/misc/autocomplete.js index d71441b..e8f1ea1 100644 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -310,7 +310,9 @@ Drupal.ACDB.prototype.search = function (searchString) { } }, error: function (xmlhttp) { + if (xmlhttp.status != 0) { alert(Drupal.ajaxError(xmlhttp, db.uri)); + } } }); }, this.delay);