Drupal 7: Heartbeat comment messages show up twice!
Heartbeat messages were showing up nicely on a project we have been working on lately, bringing up all the member activities including changing the user account details, adding or editing nodes and commenting on nodes.
Everything was working fine right out of the box - except one minor inconvenience that we noticed: all comments were showing up twice in the heartbeat stream.
As many love to say, this is not a bug, it is a feature. The comment does not show up twice: The relevant rule Log activity when a node is commented that comes out of the box will use (by default) the following value and tokens:
[comment:title]<br />[comment:body] .
In our project we had removed the option to allow users to post a title in their comments. Heartbeat, on the other hand, will try to show the comment title through a token via the Rule . Drupal puts in the title part of the message, and the rule also puts in the log the title of the message, therefore making us think that the comment shows up twice.
The really easy "fix" is to change the
[comment:title]<br />[comment:body] comment value in the rule to