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.

Comments

Dave Cohen’s picture

StatusFileSize
new1.11 KB

Here's a patch that fixes at least one of the drupal_set_message calls. I think there are others...

Dave Cohen’s picture

Status: Active » Needs review

Changing status...

This work sponored by medem.com.

ashtonium’s picture

Revision author now displayed instead of node author. thanks.

This problem was also reported back at: http://drupal.org/node/140232

ashtonium’s picture

StatusFileSize
new1.81 KB

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.

chromix’s picture

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.

indianroo’s picture

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.

indianroo’s picture

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.

add1sun’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

needs to be fixed in both D5 and D6

add1sun’s picture

Title: currently viewing a revision of this post created ... by AUTHOR » revision should identify revision author not the original node author

changing title to be clearer

add1sun’s picture

OK, i've got two patches, one for 5 and one for 6. They both fix the name AND the date issue.

add1sun’s picture

Status: Needs review » Fixed

The patch changed a bit due to other recent fixes going so I just fixed it up. Committed to 5, 6, and HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

irtech’s picture

Status: Closed (fixed) » Active

The "Revision: Author" views field still shows the node author, not the revision author. Set to open.

carpintero’s picture

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.

Ian_0’s picture

subscribe

brisath’s picture

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.

Andan’s picture

Subscribing to brisath.
We ha now one field: User: Name (The user or author name.)
desired:
1. User: node author
2. User: revision author

Revision author shows the changer of the revision.

Better solution: not new field, but new option on "configure field" (user).
checkbox: Show the author of revision. (not the author of node).

yonailo’s picture

+1 subscribing