Download & Extend

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

Issue Summary

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

#1

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

AttachmentSize
174888.diff 1.11 KB

#2

Status:active» needs review

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.

AttachmentSize
rev_author_name2.patch 1.81 KB

#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

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

needs to be fixed in both D5 and D6

#9

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

#10

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

AttachmentSize
rev_mod-d6-correct-name-and-date_174888-10.patch 2.21 KB
rev_mod-d5-correct-name-and-date_174888-10.patch 2.17 KB

#11

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.

#12

Status:fixed» closed (fixed)

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

#13

Status:closed (fixed)» active

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.

#17

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).

#18

+1 subscribing