Running on Drupal 4.7.6 on Apache/1.3.37 (Unix) PHP Version 5.2.1 Mysql 4.1.

The Allow Overide is set to All

With a fairly heavily customised theme I could create a chat room and a chat, but when I typed text it would not send it - the text stayed in the entry box. Also it never ended up in the message log.

I switched to a standard version of Blue Marine as my theme, and now when I type and click send the message disappears from the entry box, but nothing appears in the chat window, but checking the message log the Chat was recorded by the DB . An improvement - but still leaves Chatroom, as a method of communication, mostly suitable for telepaths :-(

Using Firefox Error Console there are a number of errors that are all the same;

Error: missing ; before statement
Source File: http://www.(redacted for privacy).com/modules/chatroom/chatroom.block.js
Line: 17, Column: 6
Source Code:
Fatal error: Call to undefined function  chatroom_send_ajax_response() in /hsphere/local/home/saltbush/saltbushmeats.com.au/modules/chatroom/chatroomread.php on line 208

All the errors are marked as fatal.

CommentFileSizeAuthor
#21 big_house.gif12.83 KBajwwong
#5 chatroom_9.patch683 bytesdarren oh

Comments

genwolf’s picture

Additional information;

Running on Internet Explorer instead of Firefox, I still don't see the text in the chat window - but if I exit and then return, I can see the last few messages.

I was also getting a number of these errors in my Error console:

Error: chatroom.userColours[j] has no properties
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.js
Line: 579

In addition some of the most common warnings produced in the console are below:


Warning: reference to undefined property chatroom.userColours.length
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.js
Line: 617

Warning: reference to undefined property chatroom.warnInterval
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.js
Line: 657

Warning: function collapseEnsureErrorsVisible does not always return a value
Source File: http://www.(redacted for privacy).com.au/misc/collapse.js
Line: 53, Column: 49
Source Code:
        return removeClass(fieldset, 'collapsed');

Warning: function chatroomBlockGetUpdates does not always return a value
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.block.js
Line: 264, Column: 8
Source Code:
  return;

Warning: function chatroomGetCommandMsg does not always return a value
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.js
Line: 206
Source Code:
}

Warning: variable e hides argument
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.js
Line: 650, Column: 8
Source Code:
    var e = window.event;

Warning: reference to undefined property chatroom.warnInterval
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.js
Line: 657

Warning: reference to undefined property chatroom.lastMsgTime
Source File: http://www.(redacted for privacy).com.au/modules/chatroom/chatroom.js
Line: 538
darren oh’s picture

Status: Active » Postponed (maintainer needs more info)

The error messages indicate that the module path is not working. Try moving the module to sites/www.example.com/modules and see if it works.

darren oh’s picture

Actually, the error messages indicate that many variables are not being sent at all. I'll be happy to investigate if you privately send me a link to one of your chats.

darren oh’s picture

I found one problem. Try applying the patch in issue 121876 and let me know if it makes a difference.

darren oh’s picture

StatusFileSize
new683 bytes

Try out this patch and see if it eliminates some "does not always return a value" errors.

genwolf’s picture

I tried the patch for common.inc but patch (using unxUtils on Windows failed to patch with a complain about a hunk error.

I will try the patch for chatroom .

darren oh’s picture

I'm sorry. The common.inc patch was for the HEAD version. I just added a patch for Drupal 4.7.

darren oh’s picture

Title: Text does not appear, or get sent to window - missing before statement » Text does not appear in window on my site
Status: Postponed (maintainer needs more info) » Active

Debugging shows that, on your site, execution of chatroom.js stops at line 579:

if (chatroom.userColours[j].unUsed) {

I will try to find time to investigate this line later if no one else does.

genwolf’s picture

I get this patch error when I try the chatroom_9.patch:

Assertion failed: hunk, file patch.c, line 321

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Will you post the common.inc patch for Druapl 4.7.6 here - or should I get it from CVS ?

Cheers

darren oh’s picture

The patch is for Drupal 4.7.6. Are you applying it from within the includes directory?

darren oh’s picture

Category: bug » support
Status: Active » Fixed

I have confirmed that the patch works by reverting to the original 4.7.6 code and reproducing the problem on my site. I changed the documentation to reflect the need for this patch in CVS commit 59160. If you are having trouble patching, change the lines by hand.

darren oh’s picture

By the way, what was happening was that line 578 of chatroom.js was checking for the length of the chatroom.userColours array. Because of the drupal_to_js bug, this variable would be an object rather than an array. The result would cause the script to be aborted on the next line.

genwolf’s picture

Had to patch the files manually and all is working now ( I think ) at least chat is.

Thanks your help !!!

If you want to do any more testing let me know - otherwise I will delete your account on the site - or at least chanage permissions .
Cheers

darren oh’s picture

Feel free to delete my test account.

Anonymous’s picture

Status: Fixed » Closed (fixed)
ajwwong’s picture

After updating my October 2006 version of chatroom

[// $Id: chatroom.module,v 1.50.2.7 2006/10/22 20:51:35 darrenoh Exp $]

with the most recent one....

[// $Id: chatroom.module,v 1.50.2.49 2007/04/11 22:58:33 darrenoh Exp $]

.... I am now seeing this same issue with my chat here: http://www.ithou.org/chatrooms/chat/1

No text is visible, even after typing and entering into the textbox....

I have applied the patch to drupal 4.7.6 ( by hand) ... as per the install instructions... so common.inc now looks like this:

    case 'array':
//      if (array_keys($var) === range(0, sizeof($var) - 1)) {
      // Arrays in JSON can't be associative. If the array is empty or if it
     // has sequential whole number keys starting with 0, it's not associative 
	// so we can go ahead and convert it as an array.
      if (empty($var) || array_keys($var) === range(0, sizeof($var) - 1)) {
        $output = array();
        foreach($var as $v) {
          $output[] = drupal_to_js($v);
        }
        return '[ '. implode(', ', $output) .' ]';
      }
      // Otherwise, fall through to convert the array as an object.

However, still nothing is showing up when I type in the text...

I have emptied the cache. And also tried dropping and then reinstalling the chatroom tables...

Any ideas or support would be deeply appreciated. [I actually had the chatroom module from October 2006 working, but thought that I should update. ]

Blessings,
Albert Wong
www.ithou.org

Thanks for your help...

ajwwong’s picture

Status: Closed (fixed) » Active
darren oh’s picture

Status: Active » Fixed

Thanks for catching that. Fixed in CVS commit 65176. A new release will be made available immediately. I believe you will find it a great improvement.

ajwwong’s picture

Fantastic! Perfect, it now works!! :-) Thanks for the quick response, Darren.... this is a *great* module!

Blessings,
Albert

darren oh’s picture

Category: support » bug
ajwwong’s picture

Category: bug » support
Status: Fixed » Active
StatusFileSize
new12.83 KB

I just noticed that the chatroom does not appear to show up in IE6 [or maybe there's something that I have disabled in the browser that I need to turn on?]

It does work, in IE7 and Firefox.

I've attached a picture to this post to show you what I am seeing when I browse the site using IE6... Text that is typed in does not show... in fact there is just a blank chat room.

The actual chat room is located here:
http://www.ithou.org/Big_House

Any advice or suggestions would be appreciated.

I am using the version 1.50.2.50 of chatroom for drupal 4.7 with the patch to common.inc in place as described above.

Thanks,
Albert

ajwwong’s picture

Strange... I'm actually getting more information and I actually can't quite understand it, because it appears as if the chat space on the site is working in one chat room and not the other...

For example...

www.ithou.org/lodge

seems to work

but www.ithou.org/Big_House

does not seem to work...

[EDIT: It is all working now... Not quite sure what the bug was... I will do more due dilligence and see if it was a server error rather than the script. Sorry for taking up the bandwidth....]

darren oh’s picture

Status: Active » Closed (fixed)
kasalla’s picture

Version: 4.7.x-1.9 » 5.x-1.9
Status: Closed (fixed) » Active

Hey folks,

Drupal-Version is 5.6, Chat-Version chatroom-5.x-1.9.
Installation, Setup etc. worked fine, but if I try to send a Msg nothing happens. No Message is displayed. I´ve reinstalled the module, but nothing changes.

Can anybody help?

darren oh’s picture

Version: 5.x-1.9 » 4.7.x-1.9
Status: Active » Closed (fixed)

This issue dealt with a different version of Chat Room. Please open a new issue if you cannot find an issue for the current version that covers your problem.