If I muck around in a Tag Tool enabled field, then push Save on the node form, I get this JavaScript error:
An HTTP error 0 occurred.
mysite.com/taxonomy/autocomplete/2
it works fine after I dismiss the alert and save the node, but obviously this is not ideal behavior :)
Also, this is a site I moved servers. It does NOT have the problem on one - only on the other. Is there any other info I can give to help figure it out?
thanks!!
Comments
Comment #1
mattwmc commentedI get the same problem. Whats going on??
Comment #2
gilgabar commentedI haven't used this module, but I've seen this error in other contexts. When I have encountered it, it is because the base_url is set to something like http://www.example.com and you are visiting http://example.com. It was hard to track down and can seem random or appear to only happen on certain servers. I would recommend opening up your settings.php file and checking the base_url.
Comment #3
Mark commentedFirebug can help a lot with errors like this. Just watch the HTTP requests and see what really happens under the hood.
Comment #4
Ralph Manis commentedThis can also happen if you use SecurePages module and have pages to use it set to node/add* & node/*/edit which will set your URL to https:// and your in your settings.php have the base_url set to something like http://www.my-drupal-site.com. You can still add and enter categories, you just can't use the "Auto Complete" function.
If you are the only editor and administrator or you have a trusted staff of admins and editors I would remove node/add* & node/*/edit from the list. (It is only needed on publicly editable websites)
Comment #5
saturnino commentedI had the same problem with autocomplete on a multilanguage site
with languages based by domain name
example
fr.gie.tv
en.gie.tv
it.gie.tv
de.tv
etc...
When I'm on content page and i want to translaite i got the bug
example : french admin translate an italian content
http://fr.gie.tv/node/add/videopage?translation=20&language=it
I found that the pb was the domain name
autocomplete call "http://it.gie.tv/taxonomy/autocomplete/belissima"
but the domain where the file is called is fr.gie.tv
So this is a security issue I think.
My solution was to hack autocomplete.js (I know it's bad but i have had to find a very quick solution) for calling a php proxy.
In Drupal.ACDB.prototype.search function (line 270)
I added :
if( db.uri.search("/taxonomy/autocomplete/"))
db.uri = window.location.protocol + '//'+window.location.host + '/taxonomy-autocomplete-proxy.php?uri='+db.uri +'/'+ Drupal.encodeURIComponent(searchString);
And i replaced :
url: db.uri +'/'+ Drupal.encodeURIComponent(searchString),
by :
url: db.uri,
here it is my proxy code
that's worked for me.
Is there a better solution which will no need to hack autocomplete.js ?
thank you