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.
http://www.*******.info/taxonomy/autocomplete/2"

How can I solve this problem?

Comments

entropicarbon’s picture

any help would be appreciated...

wwwoliondorcom’s picture

Hello,

I get this error:

An HTTP error 0 occured.
http://www.MYWEBSITENAME.com/taxonomy/autocomplete/5

Anybody knows why ?

Thanks a lot.

wwwoliondorcom’s picture

Hi,

Can you tell us if you found a solution ?

Thanks.

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.
http://geremiadoan.com/?q=taxonomy/autocomplete/2
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

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']) {
    drupal_add_js('misc/autocomplete.js');
    $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.

Feel free to message me for help on your drupal site "Let's spread the Drupal knowledge!!"

wwwoliondorcom’s picture

Hello,

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

Does it work on Drupal 6 ?

Thanks.

MarcElbichon’s picture

Hi,

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 !