Chat messages are not appearing in the chatroom module (for me anyway). Firefoxes javascript console give the following error, occurring every second as it tries to update.

Error: invalid flag after regular expression
Source File: http://coap.chickenkiller.com/modules/chatroom/chatroom.js
Line: 52, Column: 10
Source Code:
<b>Notice</b>:  Undefined index:  type in <b>/var/www/coap/modules/chatroom/chatroomread.php</b> on line <b>124</b><br />

Comments

Gerry Danen’s picture

I had the same problem, and made the following changes:

chatroomread.php [162] changed $_POST['timestamp'] to $_POST['chat_timestamp']
chatroomread.php [114] changed is_null($_POST['type']) to empty($_POST['type'])
chatroom.module [820] changed $chats_js to $chat_js

I initially noticed error log entries and when I pursued them, the messages showed up. Perhaps chatroom.js pointed in the right direction. I use Firefox 2 but did not check the js console.

darren oh’s picture

Status: Active » Fixed

$_POST['timestamp'] is correct, but I fixed the other errors. Thanks.

darren oh’s picture

Status: Fixed » Active

Fixing the errors didn't eliminate the original problem. It seems that the chat panel doesn't start updating until the user sends a message.

elyobo’s picture

Interestingly, without making any changes, it worked fine on my local machine, w/debian unstable. I'll attempt to update it on the server and let you know if I find any solution.

elyobo’s picture

Hi guys,

Thanks for the assistance. Gerry, your suggested fixes appear to make things work on both my development box running unstable and my clients server running sarge.

Daren, making just the first two changes that Gerry suggested on my development box put me in the state you described; things worked, but it wasn't updating until I made a comment.

That said, with a reasonably up to date unstable build, things worked fine without any changes. I don't know anything about ajax (or javascript for that matter) so I can't really help so much. I can supply version information for packages if this would help you in your debugging at all.

Thanks,

Liam

darren oh’s picture

Status: Active » Fixed

This problem seems to have been fixed by CVS commit 47440.

Anonymous’s picture

Status: Fixed » Closed (fixed)