Hi,

I just installed chatroom on drupal 5.1, apache 1.3, mysql 5.0, php 4.4.4, and try to access is through firefox 2.0.0.1. I applied this patch too: drupal_to_js-array-DRUPAL-5.patch. I can configure the chatrooms ok, but when I'm in a chat I can't send text. Pressing enter or clicking on send does nothing.

When entering the chat, the error console show:

Warning: Error in parsing value for property 'display'.  Declaration dropped.
Source File: http://XXX/modules/system/defaults.css
Line: 43
Warning: Unknown property 'filter'.  Declaration dropped.
Source File: http://XXX/sites/all/modules/imce_gallery/imce_gallery.css
Line: 17

Did I do something wrong ?

CommentFileSizeAuthor
#24 chatroom_11.patch49.11 KBdarren oh
#17 chatroom_10.patch31.24 KBdarren oh

Comments

xav’s picture

Priority: Normal » Critical
darren oh’s picture

This was working for me two days ago, but after I emptied my database and reinstalled Drupal yesterday, it no longer worked. I did find a problem with the capitalization of Drupal.JsEnabled, which is fixed in CVS commit 59952.

xav’s picture

I applied you patch, but that didn't fix it for me.
Do you have any direction for me to help find the problem ?

darren oh’s picture

It's not fixed for me either. Execution of chatroom.js stops on line 598.

darren oh’s picture

If you would like to help fix this, try replacing misc/jquery.js with the uncompressed jQuery library at http://jquery.com/src/jquery-1.0.js so you can see the code being run. I'm finding that execution is aborted on line 914.

darren oh’s picture

I eliminated some Drupal 4.7 JavaScript commands in CVS commit 60009 (the commit somehow got combined with someone else's unrelated commit). Messages now appear. The away and back status is not shown.

xav’s picture

I'm not sure I understand you very well ... do you mean I have to apply commit 60009 to fix it ?

xav’s picture

I just applied it, and now the messages look like they are sent (they disappear from the line), but nothing appears in the big chat window (and the chatroom summary says the chat has 0 messages).

xav’s picture

BTW, with the uncompressed jQuery, I get something like 'jQuery not defined' in the javascript console, and some things don't work. I replaced it with the compressed one, and now the error I've got is:

Error: chatroom is not defined
Source File: http://test.parateam.com/sites/all/modules/chatroom/chatroom.js
Line: 661

The line 661 is " chatroom.hasfocus = false;" in chatroomFocusHandler(e).

darren oh’s picture

Try emptying your cache and restarting your browser. It was probably some old JavaScript files in my cache that made it seem to work at first.

xav’s picture

Nope, still nothing. Does it work with stock 5.1 for you ? Maybe I have some parasitic modules ...

darren oh’s picture

No, it won't work with Drupal 5.1 without some modification. There is a link to a patch on the Chat room project page. The next version of Drupal will work without modification.

darren oh’s picture

Title: Can't "send" text » Can't send text
Status: Active » Needs review

After commit 60252, the code in CVS seems to be working. I'd like some confirmation to be sure. Please be thorough. To test the code,

  1. Apply the patch in issue 121876 if you have not already done so.
  2. Uninstall Chat room.
  3. Clear your browser's cache.
  4. Replace your Chat room files with the latest DRUPAL-5 files from CVS.
  5. Start Drupal.
  6. Enable Chat room.
  7. Creat a chat room and a chat.
xav’s picture

It still doesn't work. It looks like the text is sent, but nothing arrives to the server (in the log, I can only see series of successful POST /sites/all/modules/chatroom/chatroomread.php).
I went as far as disabling a series of unrelated modules (they showed some CSS warnings in the error console), and I even tried with IE to be sure (that one had certainly nothing is the cache, it was its 1st time on internet).

BTW, when I tried with 'links' (textmode, no javascript), sending a line made it POST /search/node - that doesn't look good. But then, I suck at javascript, so I don't know how all this is intended to work.

xav’s picture

BTW, here is an excerpt from the generated code ("show source" from the browser):

      <!-- start main content -->
      <div id="chatroom-container"><div id="chatroom-board"></div><div class="clear-both"></div>

<div id="chatroom-textentry">
<span class="chatroom-textentry-title">Type your message</span><br/><br/>
<input type="text" id="chatroom-msg-input" size="50" />
<input type="submit" id="chatroom-msg-submit" value="Send" />
<div class="chatroom-textentry-options"><label><input type="checkbox" id="chatroom-msg-away" /> set my status to "away"</label></div>
</div>
</div>            <!-- end main content -->

(Still from a javascript-ignorant guy) how can that send something to the server ?

Thanks,
Xav

darren oh’s picture

The JavaScript is in a separate file. Elements on the page have IDs so the JavaScript file knows what to do with them.

darren oh’s picture

StatusFileSize
new31.24 KB

Here's a patch that will bring the first release up-to-date with CVS.

xav’s picture

After digging further, it finally looks like the message makes it to the server. Here is what a tcpdump capture gives me (hostname is edited, only the 3 interesting packets are there):

POST /sites/all/modules/chatroom/chatroomread.php HTTP/1.1
Host: test.XXX.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061208 Firefox/2.0.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: close
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://test.XXX.com/chatrooms/chat/1
Content-Length: 260
Cookie: PHPSESSID=cb73939e9c7d39743cd01a92864b464d
Pragma: no-cache
Cache-Control: no-cache


chatroomMsg=Hello&smileys_base=sites%2Fall%2Fmodules%2Fsmileys&chatroom_base=sites%2Fall%2Fmodules%2Fchatroom&update_count=7&user_base=modules%2Fuser&chat_id=1&last_msg_id=0&timezone=3600&timestamp=1173716949&chat_cache_file=%2Ftmp%2Fdrupal_chat_cache%2Fchat_1
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2007 16:29:16 GMT
Server: Apache/1.3.34 (Debian) mod_gzip/1.3.26.1a PHP/4.4.4-8 mod_ssl/2.8.25 OpenSSL/0.9.8c DAV/1.0.3
X-Powered-By: PHP/4.4.4-8
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
 
0
 
 

How can I trace that inside Drupal now ?

Thanks
Xav

darren oh’s picture

A development snapshot should be available on the project page soon. Please use it for testing.

darren oh’s picture

Xavier, the best tool for seeing what is happening is Firebug, a Firefox add-on. You can inspect your scripts and variables, see what is being sent and received, and make live modifications. If you give me access to your chat room, I could check what's happening for you.

xav’s picture

OK, I've sent you the address by mail.

Thanks Darren,
Xav

sean2000’s picture

I uninstalled the previous chatroom and installed the dev snapshot at http://drupal.org/node/127182 and I still can't send text. Anything I can do to help? I am moderately familiar with javascript.

xav’s picture

Thanks to Darren's debug version, I found the problem: my sites/ directory is in fact a symlink to somewhere else, and chatroom's code tries to go back to drupal's root by doing '..' and ends up in the wrong directory.
Of course, as it does chdir() before bootstrapping drupal, it doesn't have the convenience functions to find the root easily by itself. I wonder though if there's a proper means of doing that ?

darren oh’s picture

Assigned: Unassigned » darren oh
Status: Needs review » Fixed
StatusFileSize
new49.11 KB

I fixed this in CVS commit 60575 by sending the absolute filesystem path to the Drupal root directory with each update request. The attached patch brings release 5.x-1.0 up to date.

xav’s picture

OK, that works now.
Thanks Darren !

Xav

paulos’s picture

Version: 5.x-1.0 » 4.7.x-1.1

I have the same problem however I am unable to add a patch to my server. The only way to access my files is through the webservers broswer interface and there is no place to apply a patch. If you have the same issue how would you fix it?
Paul

darren oh’s picture

Version: 4.7.x-1.1 » 5.x-1.0

This patch does not apply to the 4.7 version. Your problem seems to be that you are not using the latest 4.7 release.

skizzo’s picture

not sure if it's the same problem: everything worked fine for the first 4 messages,
but then stopped displaying msgs (counter and "Last message" are correct, but only
first 4 messages show up in the chat). Any other patch that I should install? Thanks.

Drupal 5.1
chatroom-5.x-1.1
drupal_to_js-array-DRUPAL-5.patch
Firefox 1.5.0.10

gurukripa’s picture

Title: Can't send text » Chat room module doesnt work...no features displayed also

hi
i am using the chat room module you have released with Drupal 5.1
it doesnt work...dunno how to apply patches etc..
could u kinldy put up the higher version...or tell me what to do..thanks

darren oh’s picture

Status: Fixed » Closed (fixed)

Please do not add new issues to an old issue.

darren oh’s picture

Please do not add new issues to an old issue.