Hey,

I have a problem since hours and I can't find a solution :(
So please help me.

I install heartbeat because I want to create with the facebook-style status an activity stream.
If I create a page with a user the heartbeat module runs perfect and shows me that there are updates.
BUT if I enter a facebook-style status message and push the "share" button, the new status gets save but the heartbeat module doesn't show me updates :(

I tried to play with the rules module, but I don't get it.
Hope you understand my problem and maybe you know a solution.

If you have any questions, please tell me.

best wishes
tobma

CommentFileSizeAuthor
#2 Auswahl_006.png62.54 KBtobma
#2 Auswahl_007.png66.9 KBtobma
#2 Auswahl_008.png47.02 KBtobma
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stalski’s picture

Actually I don't.

Heartbeat has a setting "poll for newer messages", prepending activity to the heartbeat stream. If a facebookstatus is done, and you log heartbeat activity by rules, then a message should appear above the stream when js does its polling.

You could trigger that polling yourself (on facebook status submit).

So, is your problem that heartbeat never polls?
Is it the problem that it's not shown immediately?
I don't know that facebook style status module very well.

tobma’s picture

FileSize
47.02 KB
66.9 KB
62.54 KB

the module facebook-style status works fine. You can enter your status and save it. The problem is, that Heartbeat doesn't shows anything.

I don't know how to tell it the best way, so I made some pictures:

In picture "auswahl_006" you can see the normal config of heartbeat (this is my german version)
Picture "auswahl_007" shows the rule administration page. At this point I can tell you that the point "heartbeat: when user adds a page, log user activity" runs perfect. I creat a new page and heartbeat shows this.

Now the problem is the first theme in this table "Submit Facebook-style-status".

It is active but it don't works.

Picture "auswahl_008" shows the config of "Submit Facebook-style-status".

Do you understand my problem?

tobma

Stalski’s picture

I understand, but I can't tell from here what the problem could be. I did this a couple of times and it works fine here.

Send me your export of the rule and the heartbeat message template. This way I'll be able to help you.

tobma’s picture

Here is the rules export:

array ( 'rules' => array ( 'facebook_status_rules_update' => array ( '#type' => 'rule', '#set' => 'event_facebook_status_save', '#label' => 'Submit Facebook-style Status', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'facebook_status', ), '#status' => 'altered', '#conditions' => array ( ), '#actions' => array ( 0 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Log to watchdog', 'module' => 'System', 'eval input' => array ( 0 => 'type', 1 => 'message', 2 => 'link', ), ), '#name' => 'rules_action_watchdog', '#settings' => array ( 'severity' => '6', 'type' => 'rules', 'message' => '{cke_protected_1} submitted the status {cke_protected_2}.', 'link' => '/user/{cke_protected_3}', '#eval input' => array ( 'rules_input_evaluator_php' => array ( 'message' => array ( 0 => 'account', 1 => 'new_status', ), 'link' => array ( 0 => 'account', ), ), ), ), '#type' => 'action', ), ), '#version' => 6003, ), 'rules_example_1' => array ( '#type' => 'rule', '#set' => 'event_node_view', '#label' => 'Example rule: When viewing an unpublished page, publish it.', '#status' => 'custom', '#categories' => array ( 0 => 'example', ), '#active' => 0, '#conditions' => array ( 0 => array ( '#type' => 'condition', '#name' => 'rules_condition_content_is_published', '#settings' => array ( '#argument map' => array ( 'node' => 'node', ), ), '#negate' => 1, '#info' => array ( 'label' => 'Viewed content is published', 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Inhalt', ), ), 'module' => 'Node', ), ), 1 => array ( '#type' => 'condition', '#name' => 'rules_condition_content_is_type', '#settings' => array ( '#argument map' => array ( 'node' => 'node', ), 'type' => array ( 0 => 'page', ), ), '#info' => array ( 'label' => 'Viewed content is Page', 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Inhalt', ), ), 'module' => 'Node', ), ), ), '#actions' => array ( 0 => array ( '#type' => 'action', '#name' => 'rules_core_node_publish_action', '#settings' => array ( '#argument map' => array ( 'node' => 'node', ), 'auto_save' => true, ), '#info' => array ( 'label' => 'Publish viewed content', 'module' => 'Node', 'arguments' => array ( 'node' => array ( 'label' => 'Inhalt', 'type' => 'node', ), ), 'base' => 'rules_core_action_execute', 'action_name' => 'node_publish_action', 'configurable' => false, 'label callback' => 'rules_core_node_label_callback', ), ), ), '#version' => 6003, ), 'content_profile_rule_1' => array ( '#type' => 'rule', '#set' => 'event_user_login', '#label' => 'Redirect to profile creation page, if users have no profile.', '#active' => 0, '#weight' => '0', '#conditions' => array ( 0 => array ( '#negate' => 1, '#weight' => 0, '#info' => array ( 'label' => 'Logged in user has his Profile created', 'arguments' => array ( 'user' => array ( 'type' => 'user', 'label' => 'User', ), ), 'module' => 'Content Profile', ), '#name' => 'content_profile_user_has_profile_condition', '#settings' => array ( 'type' => NULL, '#argument map' => array ( 'user' => 'account', ), ), '#type' => 'condition', ), ), '#actions' => array ( 0 => array ( '#type' => 'action', '#settings' => array ( 'path' => 'node/add/', 'query' => '', 'fragment' => '', 'force' => 1, 'override' => 1, ), '#name' => 'rules_action_drupal_goto', '#info' => array ( 'label' => 'Redirect to profile creation page', 'label callback' => false, 'module' => 'System', 'eval input' => array ( 0 => 'path', 1 => 'query', 2 => 'fragment', ), ), '#weight' => 0, ), 1 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Show a message', 'label callback' => false, 'module' => 'System', 'eval input' => array ( 0 => 'message', ), ), '#name' => 'rules_action_drupal_message', '#settings' => array ( 'message' => 'You haven\'t filled out your profile information yet. Please do so now!', 'error' => 1, ), '#type' => 'action', ), ), '#version' => 6003, ), 'facebook_status_rules_delete' => array ( '#type' => 'rule', '#set' => 'event_facebook_status_delete', '#label' => 'Delete Facebook-style Status', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'facebook_status', ), '#status' => 'default', '#conditions' => array ( ), '#actions' => array ( 0 => array ( '#type' => 'action', '#settings' => array ( 'message' => 'Status deleted.', 'error' => 0, ), '#name' => 'rules_action_drupal_message', '#info' => array ( 'label' => 'Show a configurable message on the site', 'module' => 'System', 'eval input' => array ( 0 => 'message', ), ), '#weight' => 0, ), ), '#version' => 6003, ), 'fbsmp_delete_status_rules' => array ( '#type' => 'rule', '#set' => 'event_fbsmp_delete_status', '#label' => 'Delete FBSS status having FBSMP Link attachment', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'fbsmp', ), '#status' => 'default', '#conditions' => array ( 0 => array ( '#type' => 'condition', '#settings' => array ( '#argument map' => array ( 'attachment' => 'attachment', ), ), '#name' => 'fbsmp_attachment_is_link', '#info' => array ( 'label' => 'The FBSS status has Link attachment', 'arguments' => array ( 'plugin' => array ( 'type' => 'value', 'default value' => 'link', ), 'attachment' => array ( 'type' => 'fbsmp', 'label' => 'The FBSMP attachment object.', ), ), 'base' => 'fbsmp_check_attachment_condition', 'module' => 'Facebook-style Micropublisher', ), '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Show a configurable message on the site', 'module' => 'System', 'eval input' => array ( 0 => 'message', ), ), '#name' => 'rules_action_drupal_message', '#settings' => array ( 'message' => 'Link deleted.', 'error' => 0, ), '#type' => 'action', ), ), '#version' => 6003, ), 'hrule_add_page' => array ( '#type' => 'rule', '#set' => 'event_node_insert', '#label' => 'Heartbeat: when user adds a page, log user activity', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'heartbeat', ), '#status' => 'default', '#conditions' => array ( 0 => array ( '#type' => 'condition', '#settings' => array ( '#argument map' => array ( 'node' => 'node', ), ), '#name' => 'rules_condition_content_is_published', '#info' => array ( 'label' => 'page is published', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'module' => 'Node', ), '#weight' => 0, ), 1 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Content has type page', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'module' => 'Node', ), '#name' => 'rules_condition_content_is_type', '#settings' => array ( 'type' => array ( 'page' => 'page', ), '#argument map' => array ( 'node' => 'node', ), ), '#type' => 'condition', ), ), '#actions' => array ( 0 => array ( '#weight' => 0, '#type' => 'action', '#settings' => array ( 'uid_param' => '[author:uid]', 'uid_target_param' => '0', 'nid_param' => '[node:nid]', 'nid_target_param' => '', 'message_id_param' => 'heartbeat_add_node', 'variables_param' => '@username=|=[author:user-name-url]-|-@node_type=|=[node:type]-|-@node_title=|=[node:title-link]-|-@types=|=pages-|-', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'uid_param' => array ( 0 => 'author', ), 'nid_param' => array ( 0 => 'node', ), 'variables_param' => array ( 0 => 'node', 1 => 'author', ), ), ), ), '#name' => 'heartbeat_rules_default_action', '#info' => array ( 'label' => 'Logs activity for single users adding a page', 'label callback' => false, 'eval input' => array ( 0 => 'uid_param', 1 => 'uid_target_param', 2 => 'nid_param', 3 => 'nid_target_param', 4 => 'message_id_param', 5 => 'variables_param', ), 'module' => 'heartbeat', ), ), ), '#version' => 6003, ), 'hrules_add_comment' => array ( '#type' => 'rule', '#set' => 'event_comment_publish', '#label' => 'Heartbeat: When a user adds a comment', '#active' => 0, '#weight' => '0', '#categories' => array ( 0 => 'heartbeat', ), '#status' => 'default', '#conditions' => array ( ), '#actions' => array ( 0 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Logs user activity for single users', 'eval input' => array ( 0 => 'uid_param', 1 => 'uid_target_param', 2 => 'nid_param', 3 => 'nid_target_param', 4 => 'message_id_param', 5 => 'variables_param', ), 'module' => 'heartbeat', ), '#name' => 'heartbeat_rules_default_action', '#settings' => array ( 'uid_param' => '[comment_author:uid]', 'uid_target_param' => '[node_author:uid]', 'nid_param' => '[node:nid]', 'nid_target_param' => '0', 'message_id_param' => 'heartbeat_add_comment', 'variables_param' => '@username=|=[comment_author:user-name-url]-|-@title=|=[node:title-link]-|-@comment=|=[comment:comment-body-raw]-|-', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'uid_param' => array ( 0 => 'comment_author', ), 'uid_target_param' => array ( 0 => 'node_author', ), 'nid_param' => array ( 0 => 'node', ), 'variables_param' => array ( 0 => 'comment', 1 => 'comment_author', 2 => 'node', ), ), ), ), '#type' => 'action', ), ), '#version' => 6003, ), 'og_activity_rules_1' => array ( '#type' => 'rule', '#set' => 'event_og_become_co_admin', '#categories' => array ( 0 => 'og_activity', 1 => 'heartbeat', ), '#label' => 'User becomes co-admin of a group', '#active' => 0, '#weight' => '0', '#status' => 'default', '#conditions' => array ( ), '#actions' => array ( 0 => array ( '#weight' => 1, '#info' => array ( 'label' => 'Logs user activity for single users', 'eval input' => array ( 0 => 'uid_param', 1 => 'uid_target_param', 2 => 'nid_param', 3 => 'nid_target_param', 4 => 'message_id_param', 5 => 'variables_param', ), 'module' => 'heartbeat', ), '#name' => 'heartbeat_rules_default_action', '#settings' => array ( 'uid_param' => '[user:uid]', 'uid_target_param' => '0', 'nid_param' => '[node:nid]', 'nid_target_param' => '[node:og-id]', 'message_id_param' => 'og_become_co_admin', 'variables_param' => '@username=|=[user:user-name-url]-|-@group=|=[node:title-link]-|-', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'uid_param' => array ( 0 => 'user', ), 'nid_param' => array ( 0 => 'node', ), 'nid_target_param' => array ( 0 => 'node', ), 'variables_param' => array ( 0 => 'node', 1 => 'user', ), ), ), ), '#type' => 'action', ), ), '#version' => 6003, ), ), 'rule_sets' => array ( 'rules_set_1' => array ( 'label' => 'Example: Empty rule set working with content', 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'categories' => array ( 0 => 'example', ), 'status' => 'custom', ), ), )

It seems that I must add a heartbeat template, but what should I enter in these many fields ?

Stalski’s picture

You need a template indeed.
There is some documentation at the demo site. The correct order is to create a template and then use this in the rules action to log activity.
Choosing the template there will provide you some variable to token assignments. Eg. @username=[node:link]. You just need to make sure there is a template assigned and all variables you declared in the template have an correct existing token, as shown in the rules UI.

Can you get it from here?

Caleb’s picture

I am having exactly the same challenges with heartbeat and facebook style statuses. I created a template, but still my posts wont show on heartbeat