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 [comment:body].

All done!

Recent Comments

Forward by Dries Buytaert, Founder and Project Lead, Drupal; CTO Acquia.

Order now from:

Managing Expectations Podcast with DrupalEasy

Author Interview http://tinyurl.com/8a8nxno

We provide the most Shiny Drupal Bits & Pixels

Since Drupal 4.x

© 2014 Konordo Limited
Drupal Services provider.
All rights reserved.

Reg Nr. 12301661F
VAT Nr. CY10301661D

M. Director: Konstantin Ordoulidis

 

Get in touch

  • Omirou 10, 3095, Limassol, Cyprus
  • +4917698807355
  • info [at] konordo [dot] com

Submit
randomness