Hi,
I have tried to track down the source of a bug that seems to be plaguing several sites. Fortunately, I have a working copy of this module as well as a broken one with which to compare.
* What are the steps required to reproduce the bug?
Install drupal onto a server or hosting package (like GoDaddy) and use Free Tagging to create new content. As soon as the search ends for tags a popup appears similar to others noted:
The page at http://www.mysite.com says:
An error occurred.
http://www.mysite.com/mydrupal/?q=taxonomy/autocomplete/tid
* What behavior were you expecting?
To attempt the search and if failed moved on and put the notice into the status bar of the browser rather than a popup window since this is a function that will be called on every keystroke and no one likes java gnats.
* What happened instead?
Java gnats! I get several pop ups alerts with the error.
Work Around Solution:
I know where the reporting is being done (line 285 of autocomplete.js), but I don't like disabling features. I'd rather a graceful report of the error go to the status bar. I could comment this out, but that defeats the purpose of an error message. I just don't want the error message slapping me in the face every keystroke.
Probable Cause of Error:
The main difference between the site whose autocomplete works and the one that doesn't is that Godaddy inserts a header to all pages that is probably being parsed into the search component and fouling it up.
Ideal Solution:
Append to autocomplete.js a method of removing non xml components from servers that insert them to the top or bottom of a page as part of advertising, etc. Here is the goDaddy.com code:
</iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->
<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>
Comments
Comment #1
jasenward commentedFor more information regarding my attempts to work around this, see the posts in the Driggs project:
http://drupal.org/node/211525
Comment #2
jasenward commentedOk,
Solved part of my problem, but not the bigger part.
For the workaround, edit the autocomplete.js located in the drupal/misc directory
Edit line 235 ( should be a statement starting with case 'error': and replace with...
Edit line 285 (should be a statement starting with alert(Drupal.ahahError(xmlhttp,db.uri); and replace with...
I tried to work within the pre-existing structure to provide a silent error msg for the end users, but this does not correct the error.
Comment #3
jasenward commented