An HTTP error 0 occured - site/taxonomy/autocomplete/5

wwwoliondorcom - January 18, 2008 - 10:36
Project:Drigg
Version:5.x-1.8
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Hi,

I tried to post somewhere else but I didn't get any good reply
http://drupal.org/node/209288

and I still have the same problem with taxonomy on my Drigg website.

When I try to publish a window sometimes appears saying

An HTTP error 0 occured - site/taxonomy/autocomplete/5

It's always the same error and this happens only when I use the Free tagging for TAGS (no problem if I choose the option which ask you to choose the tag in a list).

Do you have any idea about what I could do for this problem?

I don't know if it is related but when I try to click a word on "tags in TAGS" it says There are currently no posts in this category with any word.

Thanks a lot !

#1

mercmobily - January 18, 2008 - 15:00
Status:active» won't fix

Hi,

I am going to have to unhelpfully and painfully close this bug with a "won't fix" -- sorry :-(

I am afraid this has absolutely nothing to do with Drigg. I only got that message if I press the "submit" button WHILE the ajax is still receiving a request.

I noticed that the response you got here was borderline rude... sorry about that. That's not very common.

However, this is completely out of my hands - sorry...

Merc.

#2

wwwoliondorcom - January 18, 2008 - 21:32

Hi,

it seems that somebody else got the same kind of problem before, but not reply:
http://drupal.org/node/136998

At keast I hope to find a solution to disable autocomplete with free tagging.

Thanks anyway.

#3

wwwoliondorcom - January 26, 2008 - 23:26
Status:won't fix» active

Hi,

Sorry to ask again about this but I can't believe that I am the only one to face this problem on different drigg and drupal install, how is it possible ?

And the problem is that it doesn't always happen, and I can't find what is the cause when it happens, maybe somebody has some ideas about where I should look ?

It happens when I click to submit a scoop, but I don't know what happens when I click? are the tags that I typed (free tagging) sent to the vocabulary Tag ?

Any help would be so much appreciated!

Thanks.

#4

mercmobily - January 27, 2008 - 01:16
Status:active» closed

Hi,

The only possible explanation I can think of is that you have a very slow internet connection.
When you type tags, the Javascript in the page starts looking up tags for autocompletion. If you type a word, and then WHILE the autocompletion query is happening you press "submit" or "preview", then that Javascript will be interrupted, and will give you that error.

So yes, it is a "bug", but it's totally innocuous and it only happens when you submit the form while autocompletion is happening!

Maybe test that this is indeed the problem, manage to reproduce it, and then submit it as a bug on the Drupal project!

Merc.

#5

funana - October 10, 2008 - 01:16

I have exactly the same problem with two of my sites. Huge freetagging taxonomy. At some point I just disabled the autocomplete function: http://drupal.org/node/136998#comment-1052317

#6

HeatherFraser - November 18, 2008 - 14:42

I get this same error you describe ("An HTTP error 0 occurred /Drupal/?q=filefield/ahah/blog/field_image/0") when trying to upload an image (using ImageField) to a Blog Entry.

This is running on a localhost development machine so network latency is not the cause.

#7

hokuspokus - November 18, 2008 - 22:46

I have to agree with Merc on this one, I think that it is related to the speed at which the autocomplete process accesses the tag database.

It is an annoying bug, you can avoid it by simply giving the field ample time to go thru the tag list and produce some suggestions, which can take up to a minute. That's crazy long for a process on each term, so you can either turn off autocomplete, or just advise your users to wait for suggestions before proceeding and click through the errors when they occur. Neither is a great solution but some explanation is better than none until it can be fixed.

#8

dwees - February 25, 2009 - 05:39

You can also look inside autocomplete.js and ahah.js and comment out any lines starting with 'alert'. This will suppress the error. Why developers would think ANYONE would want an alert error to pop up, I have no idea.

Dave

#9

wwwoliondorcom - February 25, 2009 - 19:26

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.

#10

dwees - February 26, 2009 - 10:05

This seems to work for me, just so you know. No more alert errors of any sort. It does mean that users won't get any feedback when there is a problem, but since a problem just means the autocomplete won't function, I don't see this as a big deal.

Dave

#11

jasenward - June 10, 2009 - 13:48

I realize that this is an old post, but I have just encountered this same problem and believe that I have a lead as to why it happens and a method to deal with the problem a little more gracefully than a java alert box which can be terribly annoying, if the function is called repeatedly as is the case with this tool.

The problem seems to be in the parsing of the resultant page. AJAX gets a result page from a uri such as
http://www.mydomain.com/mydrupal/?q=taxonomy/autocomplete/X.

However, what happens if the resultant page contains NON xml elements. For example, if you are hosting on a site the puts a header on every page of your site? I don't see a handler for that situation that can filter our a header. I'll provide an example of the source code from one such call and see if there are any takers on the developers side of this or some pointers on how to deal with this. I haven't had a chance, but I can write enough javascript to come up with a solution if I had the chance to understand just how this file worked.

== source of db.uri on a working site only has the following ==

[ ]

== source of db.uri on a site with trouble has the following ==

[  ]</iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->
<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>

It returns the following java alert when called from within the autocomplete.js

"The page at (my website) says:
An error occurred.
http://www.mydomain.com/mydrupal/?q=taxonomy/autocomplete/4
(no information available)

So, any takers? Could the extra information listed in the source be causing Ajax some heartburn?

#12

mercmobily - June 10, 2009 - 15:45

Hi,

I think it's *great* that you are looking into this problem that is bothering a lot of projects. But, I really think it's in the wrong spot -- this is a Drupal issue, not a Drigg issue.

I encourage you to *please* submit your ideas and possibly patches against the "Drupal" project, so that lots of skilled people can actually chip in and get it fixed for _every_ module!

Merc.

#13

jasenward - June 10, 2009 - 16:59

Oh. I promised a more graceful way to handle the error without disabling the feature entirely.

Open autocomplete.js find the line that reads: " case 'error':" (roughly line 233). Replace it with the following block:

   case 'error':
         //You may try placing debugging or reporting here, but I haven't had any success with this yet. Alert seems to be the only function call that works, which is probably why it was used, but I'd rather a silent non-critical failure than a host of popup gnats to swat.
  $(this.input).removeClass('throbbing');
  break;

Then find the line that reads the following in the same file " error: function (xmlhttp) {"
(roughly line 284). Replace it with the following block:

      error: function (xmlhttp) {
                 //Of course, you could place the error handler here, but* it seemed more logical to use the structure already provided with the setStatus function call. This way it would be more likely to be catchable, since you could also add cases and send a different string for specific error types once identified.
  db.owner.setStatus('error');

#14

jasenward - June 10, 2009 - 17:02

Mercmobily,

Thank you. I will try to find the appropriate place then to post this. I haven't yet found a real solution, but I'm getting better results (no annoying errors and the feature is not entirely disabled).

#15

garfunk - July 9, 2009 - 13:13

I've got an idea concernig this Issue. Do you have moved your drupal installation from a demo environnement to a production environement ?

The problem is some times drupal keep in is configuration bad url's from the old website, sometimes the web website is on the same serveur but on a different url so , ajax gives an error like 'can execute an ajax xmlhttprequest to a different domain from the script'...

Try to search in this direction.

#16

mompadaddy - August 25, 2009 - 01:38

I had this problem. It just appeared for no apparent reason. I read all of these comments and others. The puzzling thing was that autocomplete would work fine in Safari but not in Firefox. I suspected it had something to do with my server.

So, I just kept filling in a field (even though the autocomplete error would come up) until I knew that I had a valid value. I clicked submit.
Problem went away.

I do not profess to be any expert on any of this or have any idea for the reasons that caused the problem in the first place, but this low tech solution worked for me.

#17

aangel - September 2, 2009 - 02:46

This could be a lead for someone with the same issue:
http://drupal.org/node/136998#comment-1053169

#18

mpib - October 30, 2009 - 10:09

In my case, I found the problem and solution.

Problem:

I have installed Jquery Update module and when I updated Drupal version I copied all the files inside "misc" folder from "modules/jquery_update" to original (in root) "misc" folder.

Solution:

I restored original "misc" folder. After, I copied *only" the jquery.js file from "modules/jquery_update" to "misc".

#19

squeezebox_huf - November 21, 2009 - 10:07

I found this problem - when implementing views on my production site after it being perfectly OK on my localhost test system (xampp and another wamp!). Turns out in my case that it was an error in the general ajax (by which I mean ahah!) mechanism caused by my base_url being specified as http://domain.com within the setting.php file, but my .htacess redirecting http://domain.com to http://www.domain.com -ie htaccess was adding the www, but the ajax was confused by it. Changing my base_url to include the www fixed it for me! Hooray.

Hope this helps.

Hamish

#20

protoplasm - December 4, 2009 - 16:40

Not a Drigg issue for me as I don't use Drigg yet. The error console in Firefox indicated that the problem was a keyup or keydown issue with charCode. So I figured it must be some Javascript issue with me, as it wasn't the issue mentioned in #19 for me. I am wondering if I forgot to update my jquery_update. I reinstalled jquery_update but it was not until I selected 6100 in the update.php that my problems went away. So, keeping my fingers crossed, but this seems to be working for me. Also, I had to refresh the browser after the udpate. Hope that helps someone. It is an annoying problem. Although, I must say, the alerts did not prevent the input of information, just the autocomplete dropdown box.

 
 

Drupal is a registered trademark of Dries Buytaert.