Chat names do not appear in Block /Chat window with IE 6 and 7

eacv2 - July 17, 2008 - 19:54
Project:Chat Room
Version:5.x-1.9
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Hi, i moved my site from servers and I could make everything work except for my chat module. It comes up only with the chat window. People can type in and you can see what people typed only after you typed something. I lost the Users Online section and I can not send private messages.

I think I have a problem regarding AJAX here or some king of php.ini configuration issue but I don't know exactly what it is.

Please help em here!

#1

sjcoz - September 14, 2008 - 23:02
Title:Online users section won't show up.» Online users section won't show up. (and names do not appear in the Chat window)

I am having the same problem, so you are not alone. I am up to date with all the releases etc. I think this module was working well, when I first installed, but since I use Firefox mostly, I am not certain. I have tried a few simple things this morning, with no success. I will report back if I have any luck!

Here is my Status Report (slight trimmed):
Drupal 5.10
Configuration file Protected
Cron maintenance tasks Last run 12 min 12 sec ago
Database schema Up to date
Drupal core update status No update data available
GD library 2.0 or higher
Job queue There are no queued jobs.
MySQL database 5.0.32
PHP 5.2.0-8+etch11
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Web server Apache
jQuery Update Installed correctly
The current installed version of jQuery is 1.2.6

#2

sjcoz - September 16, 2008 - 04:22
Title:Online users section won't show up. (and names do not appear in the Chat window)» Chat participant's names do not appear in Block and Chat window with IE 6 and 7
Priority:normal» critical

I have now tested this with IE6 and IE7 and Firefox. Firefox works well.
I notice there is a patch for the 5x-1.x-dev and jQuery 1.2.6- would this be required for 5.x-1.9?

Any direction on this would be appreciated, as this is a great module (in Firefox) and I would like to use on our sites.

#3

sjcoz - September 16, 2008 - 04:24
Title:Chat participant's names do not appear in Block and Chat window with IE 6 and 7 » Chat names do not appear in Block /Chat window with IE 6 and 7
Priority:critical» normal

Reduced from Critical to Normal

#4

mrrjpp - September 16, 2008 - 20:18

I don't really have time to make a patch now but the issue is definitely stimulated by jquery update. The following will fix the issue:

var userInfo = '<a href="javascript:Drupal.chatroom.chat.selectUser("'+ chatUsers[i].user +'")" style="font-weight: bold;">'+ chatUsers[i].user +'</a>';

Replace var userInfo inside of chatroom.js, it is around line 460.

AttachmentSize
example.jpg 97.49 KB

#5

mrrjpp - September 16, 2008 - 20:19
Status:active» needs review

#6

sjcoz - September 18, 2008 - 00:07

Many thanks for your time- it is appreciated.

Tested and the block works again thanks, but the main body is still without names.

I have attached the image with the Block on the left and the main chat window on the right.

AttachmentSize
chatroom.jpg 29.18 KB

#7

webpoga - September 27, 2008 - 13:57

I currently have this problem too. This only happens in IE browsers. The doesn't appear next to the message. Anyone have any idea?

#8

ridolfidesigns - October 14, 2008 - 06:22

I have the same problem.

#9

insats - November 4, 2008 - 23:18

I've applied the fix, but the block neither the chat works in IE6/7 (the names aren't displayed)

#10

ianchan - November 6, 2008 - 20:55

Same problem for me..

Messages display in the main chat area but are not prefixed with usernames.

This problem occurs in IE7

Does not occur in Firefox 3, Safari 3 (Win), & or Opera 9.62.

#11

opensanta - November 8, 2008 - 01:17

Would someone please roll a patch?

#12

opensanta - November 8, 2008 - 01:17
Status:needs review» needs work

#13

ianchan - November 10, 2008 - 23:06

I may have a solution. It appears to work on Firefox and IE7.

The following fixes the issue for the chat messages window
Around line 299, change:

// normal msg
        if (msgs[i].user != Drupal.settings.chatroom.lastUser) {
          var span = $('<span>');

to
// normal msg
        if (msgs[i].user != Drupal.settings.chatroom.lastUser) {
          var span = $('<span></span>');

To fix the "Who's Online" chat block,
around line 462, change:

// add the users who are not in the browser list, but were in the update list
    for (var i = 0; i < chatUsers.length; i++) {
      Drupal.settings.chatroom.chatUsers.push(chatUsers[i]);
      var userInfo = $('<a>');

to
// add the users who are not in the browser list, but were in the update list
    for (var i = 0; i < chatUsers.length; i++) {
      Drupal.settings.chatroom.chatUsers.push(chatUsers[i]);
      var userInfo = $('<a></a>');

Also, at line 524 change
var msgSpan = $('<span>');
to
var msgSpan = $('<span></span>');
I tried to find documentation on how to roll a patch for Drupal modules but have not found anything as yet.

#14

opensanta - November 11, 2008 - 00:03

http://drupal.org/patch/create

If you have questions making the patch, irc would be a fast place to get them answered. Otherwise, feel free to post them here.

#15

rkdesantos - November 11, 2008 - 02:07

subscribe

#16

insats - November 12, 2008 - 11:00

Thank you ianchan! Works wonders in IE.6 as well

#17

rkdesantos - November 12, 2008 - 18:05

This seems to help however I get an javascript error (related? not related?) at lines 383 and 406:

    for (var i = 0; i < bits.length; i++) {
      var bit = $('#'+ bits[i]);
      if (bit.length > 0) {
        var smiley = bit.clone();

and

    for (var i = 0; i < bits.length; i++) {
      var bit = $('#'+ bits[i]);
      if (bit.length > 0) {
        bits[i] = bit.attr('alt');

and the error is:

Error '1" is null or not an object
code: 0

#18

digidoo - June 18, 2009 - 22:04

same issue here, subscribing...

 
 

Drupal is a registered trademark of Dries Buytaert.