Hey guys,

I installed Heartbeat as well as Token and Rules modules. Unfortunately though, whenever I do a task that should log itself as part of the heartbeat activity (comment on a node, do a shout, etc.), nothing shows up and in the drupal logs, I have the following error message under the heartbeat type:

"Error in logging user activity: it is not possible to log empty message"

I was wondering if anyone can guide me on what I might be doing wrong?

Comments

stockliasteroid’s picture

I ran into that issue as well. Some of the built-in rules (such as when a user creates a new node) seem to use tokens that aren't available for some reason. In my case I was using the "Heartbeat - user adds new page content)" triggered rule, and the "Logs user activity for single users" action, and the User token was set to [node:author-uid], which didn't work. Not sure why. I changed it to [author:uid] and it works now.

Make sure you turn on logging for heartbeat, because that's how I found out this wasn't working. When it traces the array that it uses to write the message and one of your tokens isn't working (in this case the uid) it will show the actual token in the trace instead of the value you'd expect. For example, instead of "5", which is my user id, it showed "[node:author-uid]".

Stalski’s picture

Assigned: Unassigned » Stalski
Status: Active » Fixed

Hello,

I had this as well sometimes. I changed some of the default rules tokens, but i am still not sure why it sometimes breaks. Editing and rechecking which tokens are available, fixes it.
In normal usage, it should work automatically.

Stalski’s picture

Status: Fixed » Closed (fixed)