What seems to be the goal of many, I'm trying to get Heartbeat to properly work with organic groups. To be obvious, I need an activity stream for each individual group.
Here's where we're at.
The "Organic Group" Block:
- While viewing a regular page, shows all heartbeats, even ones that aren't related to groups
- While viewing a group node, shows nothing at all
Created a View with Relationship "Heartbeat > OG"
- Shows some group related things. Leaves out a lot.
The "Organic Groups" Block:
- While viewing a regular page, shows all group-related beats
- While viewing ANY group page, shows all group-related beats
-------
I'm all out of options here. Maybe I'm missing something obvious because this seems like the type of error that's pretty critical.
?
Comments
Comment #1
Stalski commentedHave you tested with the dev version? The demosite works with that and it seems to work just fine there.
I will certainly make a new release.
At the demosite (logged in as swentel for instance) you will see : http://heartbeat.menhireffect.be/page/groups
=> this is a stream with groups activity (all groups) only. GroupsActivity is the object that does this trick.
At the url http://heartbeat.menhireffect.be/group/drupal-group , you will find all activity for this group specific.
What concerns views approach: the implementation for these objects (filters) are not ready yet. You can though still join the node and og_ancestry yourself by using a views relationship. On the demosite there is a stream that does this as well (only in dev release possible for the moment).
Let me know if you can get it to work.
Comment #2
mstef commentedNo I'm not using the dev.
No the demo site does not work. I made a few comments. It very obviously does not work (per group). There's a lot of nodes, comments, my new comments, and no activity.
Aside from that, please elaborate on how I can get it integrated with views. I would like to have that as an option next to the block.
Thanks for your help.
Comment #3
mstef commentedExtra Credit: Way to show beats from all of the groups I'm a member of?
Extra Extra Credit: Way to blend beats from my friends and groups together?
Just brainstorming good ideas...
Comment #4
Stalski commentedDemo site and development snapshot is up to date now. I hope it works for you. I am waiting on such input like yours to release again to 6x.4.7
Comment #5
Stalski commentedOk after checking again what you said here, same conclusion:
GroupsActivity
This will give Activity for all groups together what so ever. not my groups or any restriction It is only a default. You can easily create your own stream that works for "your groups" all together.
url : http://heartbeat.menhireffect.be/page/groups
OgHeartbeat
This will give the activity where the nid (or nid target) is the group. The group id itself is available only on the group page itself AND the group post pages.
url group page: http://heartbeat.menhireffect.be/group/drupal-group
url group post page: http://heartbeat.menhireffect.be/group/event/speech-display-suite-drupal...
This last thing is now committed to drupal. It will be available in next dev snapshot. (the demosite will be updated later :) )
Comment #6
mstef commentedAlright - I throw the dev in there and report back once done testing.
Thanks
Comment #7
mstef commentedTested the DEV. No difference at all.
'Organic Group Activity'
- Shows all OG on regular page. Shows nothing on group page.
'Organic Groups Activity'
- Shows all OG on all pages.
Comment #8
Stalski commentedI really dont understand why it's working for me, and not for you then.
This is correct how i meant it. If you need something else - like your groups only - then you can just add a stream in custom module.
For the group specific activity, this works on the demo site as you can see (login with zuuperman for instance and test with drupal group and the post in that group). It only shows activity from that group only.
- Maybe try running update.php as well.
- Maybe a configuration error on the stream settings page, just guessing
Comment #9
mstef commentedShould I be using the DEV or the regular release?
Comment #10
mstef commentedDoens't matter. Each aren't working at all.
I don't see a point in repeating what's happening. I just tested with at fresh installation and the same issues are still very much present. To make another mention, trying to use Views to filter out beats only for the current group does not work either.
I don't see how this is working properly on your site.
So, I'm guessing you have no solution?
Comment #11
mstef commentedWhy aren't you using og_get_group_context() in ogheartbeat.inc to determine the current group?
Comment #12
mstef commentedSQL for the group-specific block:
What's up with the timestamp stuff?
Comment #13
mstef commentedI think I found the problem. For all group related activities, you have to set the node target to the group ID inside Rules UI?
Comment #14
Stalski commentedthought about that but the code does actually the same .. will check this again.
What do you mean? You see it on the demosite or you don't? We are looking at the same thing i hope. How I see it, it works just fine for me.
The timestamp stuff is needed to load messages before and after a given timestamp. Several things in the module depend on it. The paging is done by timestamp, i wanted to give users the possibility to handle the global timespan for messages to load in and a little of performance reasons. The cron for instance can delete messages. If it's not enabled for some reasons, heartbeat will never check for "too old messages"
Indeed. But in fact it depends a little. I give a couple of examples:
- !user joins !group ==> Here the !group is the node and so we have nid as the group
- !user posts !article in !group ==> Here the !group refers to nid_target while !article refers to nid
- !user is fan of !group ==> Here the !group refers to nid
- !user is fan of !grouppost ==> Here the !group refers to nid_target
Comment #15
mstef commentedI can't get joining a group to work...
User: [account:id]
User Target: [account:id]
Node Context: [group:id]
Node Target: [group:id]
Tried with all of them set, without targets, etc...won't get registered as a group action...
Well thanks for helping and having patience. You might want to get some real DOC together so people don't have to dig in and learn it all by trial and error.
Comment #16
Stalski commentedJoining a group, i do it like this:
User: [account:id]
User Target: 0 // since there is no second user involved directly
Node Context: [group:id]
Node Target: 0 // since there is no second node at all in this case.
These parameters are there to load sql queries against but also to check duplicates and to group messages with. So try these settings as they work for me.
Comment #17
mstef commentedThanks
Comment #18
Stalski commentedlet me know if it can be closed ;)
When i have issues like this, i try to make a short guideline at the demosite to let others know more easily. For me this is mostly an indication that it is not as self-explicatory as i thought it would be, so documentation is needed.
Comment #19
mstef commentedWell you still did an amazing job with the module. Integrating with Rules was a brilliant idea - although I hated it at first (just because it was confusing).
I did what you said with group joining/unjoining actions and it's not showing up in the group feed.
[account:id]
0
[group:nid]
0
Same thing for promoting a member to group admin. Am I missing something?
(after this, I'll close)
Thanks
Comment #20
mstef commentedAlso, can't get editing a group node to show up in the group activity...
I even made a separate rule for it which checks if the updated node is a group...i made the general node update rule make sure it isn't a group.
?
Comment #21
Stalski commentedI need more information ... I cannot see why it's not working for you. Are you a developer or do you know how to debug?
if zo, it's very easy to debug in fact, just follow the stream builder logic. for the rest , i cant do much about it if i have so little information.
Comment #22
Stalski commentedFirst of all, if something is wrong, people check the database to see if it's logged what so ever. If so, heartbeat removes the message at display time and thus a permission or other restriction. Your configuration handles it.
I hope you have read documentation and you know about the permissions "access user profiles" and "access content"
Comment #23
mstef commentedYes, I am a developer. Being that I followed your instructions while setting it up, and it didn't work, I didn't think to debug and check the DB. Yes, I know about permissions, and that isn't the issue, especially because I'm doing most of the testing as UID #1.
I'll poke around and see what I can find.
Comment #24
mstef commentedLooks like BOTH the node context and target have to be set to the group ID.
Comment #25
Stalski commentedhmm can you point out the line of code?
Can you come on IRC in #drupal or #drupal-support (freenode IRC channels)? Maybe it's best i try to help you instantly when i am available.
Comment #26
mstef commentedWell, there's still one problem:
og_activity: User becomes co-owner of a group, doesn't get triggered when it happens.
Comment #27
mstef commentedComment #28
Stalski commentedindeed. and the code for it is not there anymore :(
Comment #29
mstef commentedWhy not? Can we make it happen?
Comment #30
Stalski commentedyes in fact it should work.
Comment #31
Stalski commentedFor the matter of become co-administrator: It's going to be fixed in next commit. I did not return the heartbeat message itself. For me it was still stored.
Comment #32
Stalski commentedI get now:
Comment #33
mstef commentedWhich one is it? It doesn't do anything on my end right now (using latest stable release).
Comment #34
Stalski commentedwith dev release ofcourse (for stable release you have to wait a little more) ... the co administer rule works. It will be available from next dev snapshot (tomorrow) or directly from cvs now.
Comment #35
mstef commentedI'll wait. Thanks again.
Comment #36
Stalski commentedSo with the seven release , is it fixed.
Every issue you mentioned is fixed as far as i can see and my testing go. Let me know your input.
Comment #37
Stalski commentedComment #38
mstef commentedWorks!
Strange note: [node:ogname-title-link] doesn't work. Will use [node:title-link] instead.
Comment #39
Stalski commentedhmm ok :) strange, will check that as well.
Comment #40
Stalski commentedIt works for me. [node:title-link] is not the same ofcourse. node title is the group post title, where ogname-title-link is the group it belongs too and can only be used when the nid target for instance is a group. !user posted !title in !ogtitle ...
Comment #41
mstef commentedWell I was only using [node:title-link] for the 'user becomes co-admin of a group' rule, so the node in question will always be the group.
Surprised it worked for you - my heartbeat contained the actual token text.