revision should identify revision author not the original node author
| Project: | Revision Moderation |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
A message like this appears when viewing a not-yet-published revision of a node:
You are currently viewing a revision of this post created on 09/11/2007 - 16:51 by AUTHOR.
The problem is that AUTHOR is the node's original author, and not the user who created the revision.
I'm not sure where the "proper" fix for this problem belongs. Revision moderation uses node->name to display the name. So it could be that node_load should load the revision author in addition to and/or instead of the node's original author. Or, it could be that revision moderation should perform the extra query itself to learn the revision author. Or, I suppose it could be that revision moderation intends to display the author name there, in which case the message is very misleading.

#1
Here's a patch that fixes at least one of the drupal_set_message calls. I think there are others...
#2
Changing status...
This work sponored by medem.com.
#3
Revision author now displayed instead of node author. thanks.
This problem was also reported back at: http://drupal.org/node/140232
#4
Editing a revision still displayed the "you are currently editing..." message with the node author name instead of the revision author name.
This patch replicates the fix in Dave Cohen's patch for both the viewing and editing messages.
#5
This patch still works on the latest DEV version if you apply it manually. I think this should be committed into the current version since this is a pretty big bug fix, imho.
#6
Did any notice that the date displayed for the revision is also wrong? It always displays the latest date rather than the date of the revision. No idea what the fix should be as yet.
#7
I enhanced the code in the patch to this:
$row = array();
$row = db_fetch_array(db_query('SELECT uid, timestamp FROM {node_revisions} WHERE vid = %d', $node->vid));
$current_uid = $row['uid'];
$account = user_load(array('uid' => $current_uid));
drupal_set_message(t('You are currently viewing a revision of this post created on @date by !author.', array('@date' => format_date($row['timestamp'], 'small'), '!author' => theme('username', $account))));
and now displays the correct time as well as the correct author for that revision.
#8
needs to be fixed in both D5 and D6
#9
changing title to be clearer
#10
OK, i've got two patches, one for 5 and one for 6. They both fix the name AND the date issue.
#11
The patch changed a bit due to other recent fixes going so I just fixed it up. Committed to 5, 6, and HEAD.
#12
Automatically closed -- issue fixed for two weeks with no activity.
#13
The "Revision: Author" views field still shows the node author, not the revision author. Set to open.
#14
thanks for re-opening. i also need a fix for this.
when using the "Node revision: Author name" field in views, it shows the original author. i would like to be able to make a view showing the latest revision author.
#15
subscribe
#16
Subscribing. I want to take it even farther so that ALL node revision authors can be used in an argument, not just the original author.