I was using the previous version with no problem. Dropped all tables and variables, then installed V1.5.2.4
Now, I can do Create Content|Chat room but when going to that page, when entering "Chat Name" and clicking the "Create Chat" button, nothing happens.. Table "chatroom_chat" is being updated, but I can't see the new room listed anywhere.

CommentFileSizeAuthor
#12 chatroom_3.patch1.93 KBdarren oh

Comments

ricmadeira’s picture

Maybe you should try to drop all the chatroom database tables again, and then install the module using the devel.module reinstall modules function to make sure everything is installed again?

Ogredude’s picture

I'm having the exact same problem.

I've traced it down to the SQL query in the function chatroom_get_room_summary, which returns 0 rows even when you feed it the nid of a chatroom with active chats.

I'll have to dissect the query and figure out where it's bombing. I'll keep you posted.

Ogredude’s picture

in function chatroom_get_room_summary() is the following code:

  $result = db_query("SELECT     GREATEST(COUNT(cm.cmid), COUNT(cma.cmid)) AS msg_count,
                                 MAX(cm.cmid) AS last_cmid,
                                 cc.ccid,
                                 cc.chatname,
                                 cc.when_archived
                      FROM       {chatroom} AS cr
                      INNER JOIN {chatroom_chat} AS cc
                      ON         cc.crid = cr.crid
                      LEFT JOIN  {chatroom_msg} AS cm
                      ON         cm.ccid = cc.ccid
                      LEFT JOIN  {chatroom_msg_archive} AS cma
                      ON         cma.ccid = cc.ccid
                      WHERE      cr.crid =  %d
                      AND NOT    EXISTS(SELECT cm.recipient
                                        FROM {chatroom_msg} AS cm
                                        INNER JOIN {chatroom_chat} AS cc
                                        ON cm.ccid = cc.ccid
                                        INNER JOIN {chatroom} AS cr
                                        ON cc.crid = cr.crid
                                        WHERE cr.crid = %d)
                      GROUP BY   cc.ccid, cc.chatname, cc.when_archived",
                      $room_id, $room_id);

I finally figured out what was making it fail, and removed this bit:

                      AND NOT    EXISTS(SELECT cm.recipient
                                        FROM {chatroom_msg} AS cm
                                        INNER JOIN {chatroom_chat} AS cc
                                        ON cm.ccid = cc.ccid
                                        INNER JOIN {chatroom} AS cr
                                        ON cc.crid = cr.crid
                                        WHERE cr.crid = %d)

And it now appears to work properly. I can't figure out what that bit of the query was there for. None of the rows in my chatroom_msg table had anything in the recipient field. That query alone returned as many rows as there were in the chatroom_msg table. So I'm completely unclear as to why this NOT EXISTS clause is in the query, what it does, and what I've broken by taking it out. But at least my chats get listed now.

shunshifu’s picture

That fix worked for me also.

Thank You

Phil

jpeiro’s picture

Works for me also.

Thanks for the patch Ogredude.

JPeiro.

firefiend’s picture

I'm having a similiar issue.

After creating a new chat room, then creating the chat. The chat disappears a few minutes later. The only way to re-enter that chat is by typing the chat node number in the URL bar.

Then... I cannot add any new chats to that room. I need to make an entire new chat room and then a new chat... and the process repeats itself.

The chats don't disappear unless you delete the room which held them but you cannot access the chat's in any traditional or interface method unless you create a menu link to a specific chat.

Will correcting this code eliminate this issue as well? Is it similiar to what was being described initially?

darren oh’s picture

Version: 4.7.x-1.x-dev » 4.7.x-1.0
Status: Active » Closed (fixed)

This bug was fixed in the 1.1 release.

firefiend’s picture

After creating a new chat room, then creating the chat. The chat disappears a few minutes later. The only way to re-enter that chat is by typing the chat node number in the URL bar.

Then... I cannot add any new chats to that room. I need to make an entire new chat room and then a new chat... and the process repeats itself.

The chats don't disappear unless you delete the room which held them but you cannot access the chat's in any traditional or interface method unless you create a menu link to a specific chat.

It is said that this bug was fixed in version 1.1 but this is the only version I've used. If fact, I thought I might have been mistaken but when I just tried downloading it again, I got the "file already exits..." yadda yadda.

This bug still exists.

darren oh’s picture

What file already exists?

firefiend’s picture

ah, I wasn't sure if I had downloaded version 1.1 or not so when I went to download 1.1 today, I got the "file already exists..." messege; meaning I had indeed downloaded and installed version 1.1

darren oh’s picture

Status: Closed (fixed) » Fixed

One of the queries was not working. Fixed in CVS commit 52690.

darren oh’s picture

StatusFileSize
new1.93 KB

Here's a patch for version 1.1.

Anonymous’s picture

Status: Fixed » Closed (fixed)