I downloaded the beta and created my chatroom however when I try and access it I get the following error

Fatal error: Call to undefined function chatroom_chat_get_latest_msgs() in /home3/sites/all/modules/chatroom/chatroom.module on line 636

Any suggestions?

Comments

mitchell’s picture

I think the archiving feature is causing that error. Try turning it off.

Patches welcomed.

mitchell’s picture

Version: 6.x-1.1-beta1 » 6.x-1.0-beta2

updating version

Grinch2171’s picture

Turning off the archive worked but before I turned it off I upgraded to the beta2 version and still got that error.

Babalu’s picture

subscribing

andy inman’s picture

Yes, still happens in beta2, turning off "auto-archive" does seem to make the error go away.

vallab444’s picture

it worked after I turned off archiving. thanks. unobtrusive UI, I liked it.

mitchell’s picture

Title: Fatal error: Call to undefined function chatroom_chat_get_latest_msgs » Archive feature is broken
Category: support » bug
rsvelko’s picture

Priority: Normal » Critical

guys - there isn't any function

chatroom_chat_get_latest_msgs

anywhere in the files of this module - no wonder php gives that error.... The archiving probably works but in its begining it calls that undef func ...

the string

function chatroom_chat_get_latest_msgs

can be found here in the module's files: (recursive find done with notepad++)

[chatroom\chatroom.module]
Line 636 : $msgs = chatroom_chat_get_latest_msgs($chat_id, $user->uid);
[chatroom\updates.inc]
Line 35 : $js->msgs = chatroom_chat_get_latest_msgs($chat_id, $user->uid, $last_msg_id, $timezone, $smileys);
Line 91 : $js->msgs = chatroom_chat_get_latest_msgs($chat_id, $user->uid, $last_msg_id, $timezone, $smileys);

EDIT: @maintainer: please comment that 636th line or do sth fast - switched the issue to critical

britne’s picture

subscribing

Paul Natsuo Kishimoto’s picture

I just commented on duplicate #362728: Fatal error: Call to undefined function chatroom_chat_get_latest_msgs():

The calls to chatroom_chat_get_latest_msgs need to be updated with calls to chatroom_load_messages (chatroom.module, l.819), which is newer code that accomplishes the same thing.

@rsvelko: unfortunately it is not true that "archiving probably works"; beyond the calls to that removed function, there are also several table references to {chatroom_msg_archive}, which has been removed in favour of an 'archived' column in {chatroom_msg}. Those queries also need to be updated.

vallab444’s picture

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

Assigned: Unassigned »
Status: Closed (fixed) » Active

ouch. another case of performance killing changes to the chatroom code. i'll work on using the archived flags to get something out, then restore the archive table later.

Anonymous’s picture

Status: Active » Needs review

i've committed code to the DRUPAL-6--1 branch to fix this.

please update and see if it work for you.

Anonymous’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.