Getting Fatal Error and i need best chat module which works in localhost.I am using chatroom module which is blocking my site with following error.

Members fund testing for the Drupal project. Drupal Association Learn more


sampath1’s picture

Fatal error: Call to a member function get() on a non-object in C:\wamp\www\DRUPAL\sites\all\modules\chatroom\chatroom.module on line 295

KOsipenko’s picture

Status: Active » Patch (to be ported)
513 bytes

If field is empty for the chat room, that i get error.
I wrote patch for fixing current problem.

beejeebus’s picture

Version: 7.x-2.0 » 7.x-2.x-dev


SocialNicheGuru’s picture

This is an issue.

PHP Fatal error: Call to a member function get() on a non-object in modules/all/chatroom/chatroom.module on line 305

the line in question is:
nodejs_send_content_channel_token('chatroom_' . $chatroom->get('cid'), TRUE);

And yes my nodejs server is working properly.

It seems like $chatroom does not have the get function associated with it.

I created a content type
I added the chatroom field
I created the chatroom but I did not restrict to any users.
When I went to the chatroom node for user 1. it showed up.

When I logged in as authenticated user I saw nothing.
I set the permission see all chatrooms for authenticated users.
The authenticated user could see the chat but there was no box to enter what she wanted to say or a submit button.

I then went back to the node and edited it so that authenticated users could view and chat.
When I hit submit for his change, I get WSOD and the above error.

The patch above no longer applies.

SocialNicheGuru’s picture

Title: Chatroom » Call to a member function get() on a non-object
Issue summary: View changes
Status: Patch (to be ported) » Needs work

changed title to reflect error and updated status

SocialNicheGuru’s picture

Looks like the the variable $chatroom is treated like an object throughout the chatroom code but it is no longer an object.

Gergely Lekli’s picture

Status: Needs work » Fixed

Looks like this has already been fixed somewhere along the way. The field item is being checked for empty value.

Status: Fixed » Closed (fixed)

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