Node.js integration: drupalchat-channel is not added

Created on 30 August 2015, almost 9 years ago
Updated 1 August 2023, 11 months ago

Hi,

I have a problem using drupalchat with nodejs. My setup should be fine, I installed the node.js integration, the drupalchat addon and enabled node.js within drupalchat config. Node.js is installed with all necessary prerequisites:
nodejs.config.js and the drupalchat_nodejs.server.extension.js are inside the nodejs module folder and a call to
node server.js
delivers results from drupalchat. However the error log shows that there is no channel added for the drupalchat user:

Still there X4BkFsDH6a6cJw7wAAAC
sendPresenceChangeNotification 1 online { '1': [] }
Auth - 1
Sent message to client X4BkFsDH6a6cJw7wAAAC
Added - 1
Added channels for uid 1: nodejs_user_1

So if I load my Site I only can see users logged in for approximately 1 second! Then the drupalchat window is empty. If I am fast enough and click a user within that second, a drupalchat_uid channel is added and I can send messages to the chosen user!

Otherwise if I call the menu callback url "drupalchat/channel/add" the log also shows that a channel is added. On the other hand, if I call the function drupalchat_channel_add() with PHP of course a channel is added (and I can see all online users permanently!), but it destroys my page layout, since the echo puts in the username everywhere.

So for some reason (at least in my setup) drupalchat doesn't create a node.js-channel on page load. The question is why?

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany h1nds1ght

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The 7.x-1.x branch is now not supported. Any bug will be fixed in the 7.x-2.x branch, until Drupal 7.x is not supported. It is probably better to focus on resolving bugs in the Drupal 8 branch and make it compatible with Drupal 9 or Drupal 10.

Production build 0.69.0 2024