I discovered a problem with autocomplete function on the "tag" field, in which user write tags to content. In IE6-7 all is ok, but in Firefox this function reports a mistake:
"An HTTP error 400 occured.

How can I solve this problem?


entropicarbon’s picture

any help would be appreciated...

wwwoliondorcom’s picture


I get this error:

An HTTP error 0 occured.

Anybody knows why ?

Thanks a lot.

wwwoliondorcom’s picture


Can you tell us if you found a solution ?


geremiadoan’s picture

I am also having this problem in Firefox. I tried it in IE with the same result.
I have Free Tagging enabled in taxonomy for content type, Blog. I begin typing some tags in the field. A little blue circle on the right end of the field spins and a list of autocomplete suggestions drops from the bottom of the field. I can choose one of the items or continue typing the term with no problem. The problem occurs as soon as I type a comma to add more terms. I get a pop up window that reads:
An error occurred.
I can click OK and continue adding terms; however the window pops up every time I press the comma button and often in the middle of typing a word. If I have several terms to enter for the content I am creating, I might have to click OK on the window 12 or more times.
I can't seem to find a way to disable this autocomplete feature, despite having scoured drupal.org. Anyone have a suggestion?
Geremia Doan

seth97’s picture

funana’s picture

I came to a point where I wanted to disable autocompletion for forms completely. I think I just
commented at somewhere at line 1402 in form.inc:

/*  if ($element['#autocomplete_path']) {
    $class[] = 'form-autocomplete';
    $extra =  '<input class="autocomplete" type="hidden" id="'. $element['#id'] .'-autocomplete" value="'. check_url(url($element['#autocomplete_path'], NULL, NULL, TRUE)) .'" disabled="disabled" />';
  } */ 

No errors so far. But does anybody know if this is correct?

Draven_Caine’s picture

Thank you so much for the fix for this .js form issue. Thank you again for all the help.

wwwoliondorcom’s picture


Can you tell me if it was the right solution or if you had to modify something else?

Does it work on Drupal 6 ?


MarcElbichon’s picture


I've had this problem. It occurs because line feeds have been written before text.
To see it, launch http://www.*******.info/taxonomy/autocomplete/2 and see code source.
If source had line feeds before { .... }, you found the problem.
Check you template.php and modules. Delete all line after last ?>.

If error persists, you can also modify /misc/autocomplete.js and add at end :

Drupal.ACDB.prototype.trim = function(data) 
    data = data.replace(/(?:^\s+|\s+$)/g, "");
	return data.replace(/\n/g, ""); 

and add

data = db.trim(data);

in Drupal.ACDB.prototype.search just before var matches = Drupal.parseJson(data);
That works for me.

Hope it helps you !

drupalfan81’s picture

I have the exact same symptoms as the original poster. Anyone know what causes this issue. It's strange because it only happens after a period of time. I noticed that if I saw it happening and I cleared all the caches and went back to the form it would work just fine. But until I cleared the Drupal cache, it would display the error with each keystrokes in that field.

So this tells me it has something to do with a caching issue. Did anyone else experience this as well?