On a 4.7.2 after installation and when displaying a chat nothing happens and my log is full of :

chatrooms/chat/chatroom.php not found
chatrooms/chat/chatroom/writemsg/1/0 not found
chatrooms/chat/user/2 not found.

Why is chatrooms/chat appended to all the URLs?

Thanks for this module!

Comments

Anonymous’s picture

can you tell me what is printed in the source of the page for the chatroom urls? there should be a section like this in the head of the document:

var chatroom = { ...
readUrl : 'chatroom.php',
writeUrl : '?q=chatroom/writemsg/',
userUrl : '?q=user/',
....};

jun’s picture

This is what I have in the rendered javascript from my browser.

readUrl : 'chatroom.php',
writeUrl : 'chatroom/writemsg/',
userUrl : 'user/',

If I add manually add the absolute path of my site the "not found" messages in the log disappear... like :

readUrl : 'http://www.mysite.org/chatroom.php',
writeUrl : 'http://www.mysite.org/chatroom/writemsg/',
userUrl : 'http://www.mysite.org/user/',

However then I get a javascript error

resArray[2] has no properties in line 36 of chatroom.js

Any clue?

jun’s picture

Version: » master
Status: Active » Needs review

I sorted out my first problem by adding the absolute URL as descibed in the post above and then I had a werid issue where mysite.org/chatroom/writemsg/1/0 was actually handled by chatroom.php . I don't know enough php or apache to understand how that happened. But sure enough, modifying chatroom.module, first in chatroom_menu() :

$items[] = array('path' => 'chatrooms/writemsg',
'callback' => 'chatroom_chat_write_msg',

and then here :

writeUrl : 'chatrooms/writemsg'

worked like a charm.

I found that line 115 of chatroom.module must also be changed to:

$options[$chat->ccid] = check_plain($chat->chatname);

Here's my 2 cents !

Peace,

Jun.

Anonymous’s picture

thanks for the bug reports :-)

i've committed some initial fixes for the paths issues while i was at work today - please update from cvs and see if they fix the problems you were having.

Anonymous’s picture

Assigned: Unassigned »
Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)