For testing, I added all 3 streams: site activity, public stream, and private stream to a page, as well as the shoutbox. When I make a shout with an authenticated user (but not admin), none of the 3 streams shows anything. However, the shout is in the database and shown when I log in and view the stream with my admin account. I tried another non-admin account and the problem is the same. It always says "No activity yet."
I already gave permission to "Authenticated User" to make shouts and view heartbeat streams.
What am I missing?
P.s.: What is the difference between "public stream" and "site activity"?
Comments
Comment #1
jaochoo commentedI attached the contents of database tables "shouts" and "heartbeat_activity":
Comment #2
Stalski commentedSorry to say this again but site activity does not exist. Site activity is in the example module which is NOT for production usage.
There is no difference and it's as i said before only an example on how to override the public activity or add a new stream.
I don't know what you are missing but it works for me. If the user has not set to see the messages in his profile, you will not see them ofcourse.
I would be glad if you checked why it's not working on your site. Maybe i can learn from it. See keep me updated here.
So my guess is indeed you configured something incorrect.
Comment #3
jaochoo commentedOkay, obviously I found the problem: I had to grant the authenticated user the permission "access user profiles" (section "user module" in /admin/user/permissions). After giving that permissions everythings shows up well. I did not close this issue as fixed because you might consider giving users to view activity messages even if they are not allowed to access user profiles (or at least add a note to the installation documentation).
Comment #4
Stalski commentedHowever, the images show that it is logged fine. I have no idea why the other users cannot see this.
Possibilities:
- logged in user himself denied the message type in his profile
- He is not allowed to see the shouts (stream configuration, role based)
So what i would recommend is the following: Just debug "heartbeatmessagebuilder.inc" object in the includes folder and specific in the private function checkAccess. There messages are blocked for several of reasons. Maybe you find the bug there.
Keep me updated, as i cannot reproduce the problem.
Comment #5
jaochoo commentedLike said in my previous post: It seems the problem was that I need to grant permission to "access user profiles" of the "user module", otherwise it would not work. So you might try doing the following:
(0) Enable the core user profile module.
(1) Create a sample page with shout block and stream.
(2) Use two user roles for testing: Administrator and another user role (take "Authenticated User", for example).
(3) For the other user role (e.g. "Authenticated User"), go to /admin/user/permissions and uncheck "access user profiles" (section "user module"), i.e. to not grant the permission to view user profiles.
(4) Try to make a shout. The shout appears in the database, as well as the messages, but the streams ill show "No activity yet".
(5) Go back to /admin/user/permissions and grant permission to "access user profiles".
(6) Try again to view the heartbeat stream; now you should be able to see the shout.
Comment #6
jaochoo commentedWhat exactly is the difference between the stream "Public Stream" and "Site Activity"?
Comment #7
Stalski commentedI did not close this issue as fixed because you might consider giving users to view activity messages even if they are not allowed to access user profiles (or at least add a note to the installation documentation).
I will maybe say this in the documentation indeed, however, this is clear to most people. When we provide a link to the user profile page, i want to block this because of the "access denied" page that follows onclick. So in this use case, it's clear to me that people need to see user profiles for a community module.
However, in case people do NOT provide a link to the users profile in the message, then your use case makes sense. (with links i see no problem). So i am thinking for a sollution on this.
- Garfield added page.
This is the one that is blocked where it shouldn't be. Suppose i allow it always - with unchecked access user profile, the only problem here are the cached messages. Here i just don't know whether there is a link to the users (or nodes, same principle) or not.
As i said, i 'll have to give it some thought. Maybe i will need to provide custom permissions to allow you guys to enable it (and still keep the normal access user profile to disabled). This way we could allow the users to "access heartbeat node data" or "access heartbeat user data".
Hmm, this said, it is maybe the best sollution, but still it leaves the access denied problem.
Use case:
access heartbeat user data : yes
access user profile: no
==> it shows the links or the normal user name , clicking on the link will end up in access denied.
Comment #8
Stalski commentedComment #9
jaochoo commentedWhy not just displaying the username without a link to his profile, and the linked username otherwise? That's the way other modules like RealName do it (maybe even the Drupal theme('username') function, not sure), and I guess that is why it was confusing for me. E.g. in my theme I display a small User Control Panel with his picture, some essential links (logout, my profile, etc.) and a message "Welcome to XYZ, John Doe". With "access user profiles" granted, "John Doe" will be a link to his profile, otherwise only the text string.
Do you mean that all messages are written to the DB as HTML, i.e. if the permission "access user profiles" would be granted once, the link would be already in the DB as a HTML code, so when the permission is changed next time, the link will still show up because it is retrieved from the DB directly? What's the reason for that approach anways versus storing a tokenized message? At least in terms of customization it makes things difficult; while there is that really nice theme_alter_message (or similar) function to customize the message output, you just cannot change the username easily..
Comment #10
Stalski commentedYes , that's what i mean. So i just dont know if there is a link to the username or not. So the suggested sollution wont work.
Comment #11
jaochoo commentedYes, you are right with that. So you would need to change its architecture in general and just store it a tokenized way, Not sure if you want to do that and if there are any negative implications (just out of curiousity: why is it stored that way? better performance?).. Now I am loading the message user because I have to get his picture anyways and then replace the link with a Regex.
Comment #12
Stalski commentedbetter performance indeed, each message is formed at log time (in all available languages) , better than having to do all calculations at runtime since a streams has already enough difficulties with load times.
Comment #13
Stalski commentedAT the demsite, i provided documentation on that part in the section "basic configuration". See http://heartbeat.menhireffect.be/docs/installing-heartbeat-module .
Reversily, i added this issue to the available links there to give users understanding of the problem.
For this issue, i'll leave it at that. I cannot do anything more currently that this semi-fix. for most site, it wont be a problem since the two permissions will always be enabled because of the "community factor". In other cases, it is possible to show text/links.
regards,
Stalski