I'm jumping the gun a bit using the patch I posted for 6.x, but since the chatroom.js file is different, this is probably only for that version.

If I have submitted a message within the past ~5 seconds and hit refresh, I get this error: "An HTTP error 0 occured. /site/chatroom/js"

Comments

mitchell’s picture

Version: master » 6.x-1.0-beta2

updating version

ozchris’s picture

i got this error too.
new site drupal 6.5

downloaded chatroom on 1 nov.

got the error after posting a chat, and leaving the room, by selecting something else on the menu.

andy inman’s picture

same here

strauch’s picture

i get this error too :), when i refresh the page or leave the page....

nebur’s picture

Same here, when I leave the page or refresh it I get:
An HTTP error 0 occurred.
/blog/chatroom/js

In addition when I click one of the names of people in the chat the page reloads leaving the chat and resulting in the same error. It would be nice if clicking a name would open a new page.

Babalu’s picture

too

on drupal 6.6

mxgfx’s picture

I'm experiencing this problem as well.

"An HTTP error 0 occurred.
/chatroom/js"

'It connected to the server, sent the request, and got no response.' - Error 0

"chatroom/js" appears in 'modules/chatroom/chatroom.forms.inc on line 339 [ within chatroom_chat_form() ]

  $form['control']['submit'] = array(
    '#type' => 'submit',
    '#name' => 'submit',
    '#ahah' => array(
      'path' => 'chatroom/js',
      'wrapper' => 'chatroom-board',
      'method' => 'append',
    ),
  );

it also appears in 'modules/chatroom/chatroom.module on line 84 [ within function chatroom_menu() ]

  $items['chatroom/js'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'chatroom_js',
    'access arguments' => array('access chat rooms'),
  );
mxgfx’s picture

"An HTTP error 0 occurred. /site/chatroom/js" - Mitchel
"An HTTP error 0 occurred. /blog/chatroom/js" - nebur
"An HTTP error 0 occurred. /chatroom/js" - mxgfx

What kinds of drupal configs do you guys have?

Mambo89’s picture

Assigned: Unassigned » Mambo89
Priority: Normal » Critical

I have the same problem. Dou you think it hase anything to do with wamp server on my pc? Colud work on real server?

eikes’s picture

same here, the error also appears when i leave the page

DigOurGame’s picture

Same problem here also. Running Drupal 6.9. Feel free to test it at http://dog.servegame.org

regi.bradley’s picture

subscribing

joray’s picture

Fatal error: Call to undefined function chatroom_chat_get_from_id() in /www/main/modules/chatroom/chatroom.forms.inc on line 452

version:chatroom-6.x-1.0-beta2

rebootcamp’s picture

Assigned: Mambo89 » rebootcamp

same happens to me.
i just download the beta vision today.
also the blocks are empty.
smileys and sound dont work.
i will try out the next release
hope the issue get fixed.

i use drupal in a subfolder.
maybe a basepath thing.

Gabrieles’s picture

it seems that this error message is nothing to be afraid of, it's just that the code is advertised as text/html when in fact it is serving text/javascript.
I would suggest to get rid of all the annoying pop-up messages commenting out lines 238 and 244 in chatroom.js

....or at least it works for me! ^____-

Paul Natsuo Kishimoto’s picture

Assigned: rebootcamp » Unassigned
Priority: Critical » Normal

@Mambo89, rebootcamp: when you edit the issue and assign it to yourself, that means you intend to fix it. From your comments, that doesn't seem to be the case.

@joray: please see #328811: Fatal error: Call to undefined function chatroom_chat_get_from_id() .

npobase’s picture

subscribe

wanghl165’s picture

I'm working on drupal 6.13, same happens to me.
This alert is come from misc/ahah.js, when leave the chat page, the ajax was interrupted.
I don't know how to fix it in chatroom module, so I changed ahah.js on line 211:

alert(Drupal.ahahError(response, uri));

to

if(uri.indexOf('chatroom/js') == 0) {
    alert(Drupal.ahahError(response, uri));
}

I know this is not good idea, if anyone knows how to fix it, pls let me know.
Thanks

adam_b’s picture

Version: 6.x-1.0-beta2 » 6.x-1.0-beta4

subscribing & updating to beta4 - still happening for me.

Anonymous’s picture

this is a nasty one. i'm not sure we can fix this while using the built-in form AHAH code without a core patch.

i'm considering wont-fixing this because a) refreshing the chat page is not a standard behaviour and b) the new branch of chatroom will likely not use the standard AHAH code.

i'm open to other suggestions and patches though, so i'll leave this as active.

adam_b’s picture

refreshing the chat page is not a standard behaviour

Except if you want to go to another page in the site and then use the Back button to return to the chat - it doesn't always seem to update the content, so I instinctively hit F5.

But that may have been me being impatient - I'll test it more.

adam_b’s picture

Title: js error when refreshing chat page » js error
Version: 6.x-1.0-beta4 » 6.x-1.0-beta5

Okay, I'm changing the title because I've found another non-non-standard-behaviour case: I'm getting the same error when I click the "Archive this chat" button.

aschiwi’s picture

adam_b: "I'm getting the same error when I click the "Archive this chat" button"

I can confirm this. It happens when you open a chat and wait a few seconds before you hit "archive this chat". I tested around a little bit and am now seeing that the error appears when you leave the chat page to go anywhere else on your site.

Anonymous’s picture

Status: Active » Closed (won't fix)

i can't reproduce this in the 6.x-2 branch, which doesn't use the AHAH stuff, so i'm going to wont-fix this.

my plan is to deprecate the 6.x-1 branch as soon as possible, and provide an upgrade path to 6.x-2.

i will review patches and assist anyone who volunteers to keep the 6.x-1 branch alive, but that's not my preferred course, so if anyone wants to do it, please speak with patches first, requests for help second.