Can't Type Chat Messages in Firefox 2 for Macintosh

BenK - October 10, 2009 - 19:48
Project:Instant messenger
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi everyone,

I'm using this module for its chat functionality and have just noticed problems with the Mozilla Firefox 2 browser for Mac. When using the browser, I am able to read chat messages, but unable to post them. When I try to post a message, I see the posted message in the chatroom for a split second and then the page reloads and the message disappears. No other users can see the chat message and it apparently isn't saved.

I'm not sure if the problem is just on the Mac version of Firefox 2 or also on the PC version. Everything works fine in Firefox 3 on the Mac.

Any ideas what could be causing the problem? Solutions?

Thanks,
Ben

#1

pahariwalla - November 26, 2009 - 14:03

Bummer. I don't have FF 2 so I can't re-create the problem. Do you have Firebug? If so, you can turn on the console session and see if there are any errors. Also, you can edit the im.js file and look for the following (around line 80):

      var afterSend = function(data) {
        $('div.status').html(data.status);
      }
      var sendurl= url_prefix + 'im/send_msg/'
        + $('#edit-im-my-uid').val() + '/'
        + $('#edit-im-other-uid').val() + '/?msg='
        + encodeURI(sendText);
      $.ajax({
        type: 'GET',
        url: sendurl,
        dataType: 'json',
        success: afterSend,
        data: 'js=1'
      });

and replace with:

      var afterSend = function(data) {
        $('div.status').html(data.status);
      console.log('data.status=' +data.status);
      }
      var sendurl= url_prefix + 'im/send_msg/'
        + $('#edit-im-my-uid').val() + '/'
        + $('#edit-im-other-uid').val() + '/?msg='
        + encodeURI(sendText);
      console.log('sendurl=' + sendurl);
      $.ajax({
        type: 'GET',
        url: sendurl,
        dataType: 'json',
        success: afterSend,
        data: 'js=1'
      });

and let me know what you see

#2

BenK - November 27, 2009 - 19:37

Hi pahariwalla,

Thanks for the suggestion. Yes, I have Firebug and will follow your instructions to debug. I'll report back soon.

Cheers,
Ben

#3

BenK - December 2, 2009 - 21:29

Hi pahariwalla,

As you suggested, I turned on the console session in Firebug and here's the error message that was displayed:

[Exception... "'Permission denied to get property HTMLDivElement.nodeType' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

Any idea what this means?

Thanks,
Ben

#4

pahariwalla - December 9, 2009 - 22:29

Yikes ! No I have not a clue what this means... any indication of a line number that's causing the error? I'm wonering if this is a problem between JQuery and FF2 on the Mac. Suppose I can google it. IM uses JQuery's $.ajax function to make the call to the server and then listen for the reply, so I'm guessing it's in there somewhere.

Drupal core includes the JQuery files (not sure what version) and so it seems unlikely that this can be fixed without replacing the default JQuery library with another and that's something I really don't think I want to take on. But if anyone else knows how ... ;-)

Any chance that your users with FF2 can upgrade ?

 
 

Drupal is a registered trademark of Dries Buytaert.