Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a node created by some user ,JDoe. I as admin (and for 'notebook' pages, anyone) can edit the node. However, after editing the node, the site activity says "JDoe has updated book "...."".
This should show the name of the user who updated the node, and not of the user who originally created the node.
Comments
Comment #1
Stalski CreditAttribution: Stalski commentedThis is by design. It makes sense in some case to show it like that. suppose admin only published the node, than we we sure want to see the normal actor displayed.
This can be easily changed ofcourse. Since you are using rules with tokens, you can easily choose the token of the currently logged in user (as uid and as !username). You have full customization.
Comment #2
Daedalon CreditAttribution: Daedalon commentedThe current setup sends out a false message when people collaborate in editing nodes. Thanks to Stalski's tip of customization, I'll look into that as a workaround for one community. For all future installations, I feel the default should be changed.
When User B updates a Node that User A has started, it would be correct to state either "User B has updated Node" (true) or "Node by User A was updated" (true, but less useful). It would be doubly incorrect to state "User A has updated Node" as it claims something happened when it didn't (User A did not update) and it does not tell something that did happen (User B did update).
What Stalski referred to, a case when the editor only publishes something and wants the original poster to be credited by Heartbeat, might work best as an exception. It seems likely that the general rule would be most useful and correct as "User B has updated Node". For the exception we could use either the term add or publish instead of update, as users don't perceive publishing a node for the first time to be an update: "User A's Node was published".
Comment #3
Daedalon CreditAttribution: Daedalon commentedTried customizing the settings for the rule "Log activity when published node is being updated" but didn't get it right with the provided help. What exactly should be put into the field UID instead of [node:author:uid] and into the field !username instead of [node:author:link] to display and link to the user who changed the nodes?
Comment #4
JGonzalez CreditAttribution: JGonzalez commentedSubscribing to this as I'm not sure which token should be used.
Comment #5
Stalski CreditAttribution: Stalski commentedHere you have 3 possibilities the way I see it in the rules action administration.
I now used [node:author] (author being a entity with properties, thus accessible by [node:author:uid])
Where the comment of daedalon is correct is that it is incorrect to state that userA did change the node, as it just might be the global logged in user (E.g. user1) who changed that node. In such a case, you don't want to see admin changed that node, even worse, maybe the node change should not be visible in the stream what so ever.
All things to think about.
What are your reasonings about that.
Generally, you should be able to use the tokens in the rules UI as you desire.
Default setting can be discussed a bit further.
Another example, I think daedalon suggests as well, is that the author is submitting a node, and admniistrators, cron tasks, whatever can come around and publish it. These are all dangerous ways of handling things.
In all those cases, I myself played with extra rules and playing with the conditions. Worst case scenario even split up heartbeat templates to keep things apart. E.g. when a article is published, it can't be the logged-in user, but for pages, it can be ... I dunno.
Comment #6
gausarts CreditAttribution: gausarts commentedI am having the same need. The updater should display rather than original author.
This allows tracking who changes what.
Changing
User ID
to
[site:current-user:uid]
and
!username
to
[site:current-user]
seems to do the trick. However the username does not link to its user, only the updater and picture go right now.
UPDATE: I think this issue is raised to the missing piece, node revision author, in token.module:
http://drupal.org/node/252241
Comment #7
Stalski CreditAttribution: Stalski commentedWell, as said before, I dunno what the best default is, but with configuration you can get it done.
Doesn't [site:current-user:name] or [site:current-user:link] doesn't work for you or am I missing something.
Comment #8
Stalski CreditAttribution: Stalski commentedAnd also, I hope we are talking dev version for now, since much has been approved there, and fixed. A stable release should follow soon.
So I even ask myself if this issue couldn't be closed. I'll leave that answer to JGonzalez and Daedalon
Comment #9
Stalski CreditAttribution: Stalski commentedIn my opinion, this works by design. I did change the default for "heartbeat_edit_node" from node:author to site:current-user.