I have created a content type and added the chat room field. Using this new content type, i created a new chat room content; however, whenever i type and click on chat nothing appears in the Chat Room text area and when i refresh the page nothing is displayed either. What should i do

Comments

vhenninot’s picture

Hello,

Same problem for me...

Thanks for your help,
Vincent

daniorama’s picture

Same problem for me. I know the server is working and I get from the log messages like this, but nothing is diplayed.

setContentToken: message { token: 'iLe7P3LXrueBPkMHanaoxsvSbaU7yjgU2dtKDcsP1zg',
channel: 'chatroom_2',
notifyOnDisconnect: true }
setContentToken iLe7P3LXrueBPkMHanaoxsvSbaU7yjgU2dtKDcsP1zg for channel chatroom_2
publishMessageToContentChannel: message { channel: 'chatroom_2',
callback: 'chatroomUserOnlineHandler',
data: { cid: '2', uid: '11', name: 'admintester' },
clientSocketId: '' }

langworthy’s picture

I currently have this problem when I haven't checked "Is this a public chatroom?" when creating new content.

Could this be the same problem?

daniorama’s picture

Don't know, I got the same problem either checking public or not...

Anonymous’s picture

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

daniorama and langworthy: can you try with the latest code from 7.x-2.x ? i've committed some changes from langworthy.

daniorama’s picture

I tried the new version and there are no changes... Right now it's a bit confusing...

What I did was create a new content type with a chatroom field. Then create a node with that content type. What I see is a a big box (I pressume that is where all messages should be) a smaller box below "Enter your message text here" and a chat button. I write a message in the smaller box, press chat and then the full pages reload and nothing changes. I got some data from node.js debug so it works. Something else is wrong:

setContentToken: message { token: 'Zxs5d-4vbnkRz8gUgipmd-NYzwpKvC3ptC4wvCwOT78',
channel: 'chatroom_3',
notifyOnDisconnect: true }
setContentToken Zxs5d-4vbnkRz8gUgipmd-NYzwpKvC3ptC4wvCwOT78 for channel chatroom_3
publishMessageToContentChannel: message { channel: 'chatroom_3',
callback: 'chatroomUserOnlineHandler',
data: { cid: '3', uid: '1', name: 'eladmin9' },
clientSocketId: '' }

Anonymous’s picture

if the page reloads, there's a js error somewhere, because js should take over the submit on that form.

can you turn js debug in your browser and report back js errors?

langworthy’s picture

I no longer have the issue I did in #3. Things are working well for me.

pmaster4’s picture

Can you please explain what you did to prevent the page from reloading and not displaying the data in the chat screen

langworthy’s picture

I just installed and configured nodejs.module and then added a chatroom field to a content type. Not really any other magic. I've created a simple distro for the use case I'm working on (multiple chat windows on the same page with panels). It might help you out. http://github.com/sprice/chat

pmaster4’s picture

thanks i will check it out

boian.mihailov’s picture

i have the same issue, after submit page reloads, but no errors are shown in firebug.
I turned on nodejs debug and see some updates, which i don't really understand if the message actually is submitted to the node.

publishMessageToContentChannel: message { channel: 'chatroom_2',
  callback: 'chatroomUserOnlineHandler',
  data: { cid: '2', uid: '1', name: 'admin' },
  clientSocketId: '' }
setContentToken: message { token: 'NAhnlXS8CEg41kIceaTP3XvYXZgFpwjupmKPCvEKwiM',
  channel: 'chatroom_2',
  notifyOnDisconnect: true }
setContentToken NAhnlXS8CEg41kIceaTP3XvYXZgFpwjupmKPCvEKwiM for channel chatroom_2
publishMessageToContentChannel: message { channel: 'chatroom_2',
  callback: 'chatroomUserOnlineHandler',
  data: { cid: '2', uid: '1', name: 'admin' },
  clientSocketId: '' }
setContentToken: message { token: 'X5BngtufgyCzDoMuamrzXfIu__L5eMUFvOcKf5ndKnA',
  channel: 'chatroom_2',
  notifyOnDisconnect: true }
setContentToken X5BngtufgyCzDoMuamrzXfIu__L5eMUFvOcKf5ndKnA for channel chatroom_2
publishMessageToContentChannel: message { channel: 'chatroom_2',
  callback: 'chatroomUserOnlineHandler',
  data: { cid: '2', uid: '1', name: 'admin' },
  clientSocketId: '' }

this is with the latest dev version

salientknight’s picture

Same problem and I get the following error:

Notice: Undefined property: stdClass::$name in chatroom_field_formatter_view() (line 221 of /var/www/roleplayingmarket.com/html/sites/all/modules/chatroom/chatroom.module).

carlhinton’s picture

I have the same problem

okday’s picture

same problem here. the page reload and nothing in the chat room

andrea.brogi’s picture

Me too ......

iancsmith’s picture

I had the exact same problem. It's because your nodeJS server is not setup/configured properly.

Make sure the port nodeJS is listening on is open, also check to make sure socket.io is working:

http://nodejshost:port/socket.io/socket.io.js and that Drupal is loading it properly on the chat page.

HyperD’s picture

I got the same issue

but even installing node.js as in #10 and configuring it, it doesn't work.

I mean: I installed the node.js package, I edited it copying and paste the generated config, and I expected chatroom working.

It doesn't. I asked to the provider to open the port 8080 testing with the call http://nodejshost:port/socket.io/socket.io.js as in #17

the server is not found.

Is there something I missed please?

SMTF’s picture

I also have this problem. When I run

wget http://localhost:8080/socket.io/socket.io.js

on a machine with Drupal and Nodejs installed I receive the minified js file that I expect; however it could be that socket.io.js needs to run on the client machine which may explain why this could be the cause.

remon_m’s picture

I'm having the same problem! any news here?

remon_m’s picture

Should I run the command node server.js everytime before using chatroom?

remon_m’s picture

Finally I fixed this issue. The problem was in NodeJs configuration from Drupal. You cannot set it to localhost if you are requesting the chat pages from another hosts.

plato1123’s picture

I see the config for node.js here, is this what needs to be done to fix this? I thought I was an experienced drupaler yet this is largely greek to me:
http://drupal.org/node/1713530 -- installation of nodejs

Are these really the steps that are needed? What about people that don't have shell access (luckily I do). Just seems like a bit much doing 15 server side steps to install a chat window.

Anonymous’s picture

Status: Active » Closed (won't fix)

re #23, that's a fair comment. there are other chat modules that don't require node.js, so you should perhaps consider using one of those instead.