Problem/Motivation

We currently track the revision uid (editor) separately from the node uid (author), but this information is not displayed on the node revision overview page.

This is a regression from the way it worked in Drupal 7.

Proposed resolution

Display revision_uid so that the editor instead of the initial author is properly displayed.

Remaining tasks

Reviews.

User interface changes

The node's editor would display, if different from the author, on the revisions overview page.

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

Assigned: Unassigned » jhedstrom
jhedstrom’s picture

This patch changes the UI to display as pictured in the summary.

Tagging for usability review.

I think the tests can be added more easily once #1528028: Add tests for reverting revisions where revision_uid and uid differ lands.

jhedstrom’s picture

Status: Needs review » Needs work

Oops, the screenshot indicates an obvious bug in the patch.

jhedstrom’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
44.73 KB
3.03 KB
3.48 KB

This patch resolves that issue.

The last submitted patch, 2: node-revision-overview-show-editor-2495297-02.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 4: node-revision-overview-show-editor-2495297-04.patch, failed testing.

Status: Needs work » Needs review
jhedstrom’s picture

Assigned: jhedstrom » Unassigned
jhedstrom’s picture

shwetaneelsharma’s picture

Status: Needs review » Needs work

node-revision-overview-show-editor-2495297-04.patch does not apply any more. Changing the status to needs work.

Bojhan’s picture

Issue tags: -Needs usability review

What? shouldn't it always show who edited. Thats much more relevant?

jhedstrom’s picture

What? shouldn't it always show who edited. Thats much more relevant?

Probably. The author would always be the editor of the first revision, so no information would be removed or lost if we only displayed the editor's name.

jhedstrom’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: +Regression, +rc target triage
FileSize
716 bytes

I just tested this in D7, and this is actually a regression. This patch implements Bohjan's idea in #11, which is actually how it already worked in D7.

jhedstrom’s picture

Title: Display revision_uid editor name if different from uid on node revision overview page » [regression] Display revision_uid editor name if different from uid on node revision overview page
jhedstrom’s picture

Issue tags: -Needs tests
FileSize
1.7 KB
2.4 KB
1.7 KB

Here's a test.

jhedstrom’s picture

FileSize
498 bytes
2.16 KB

Oops, unused use statement.

jhedstrom’s picture

Oops, the test was looking for the original author in both instances.

The last submitted patch, 17: 2495297-17-TEST-ONLY.patch, failed testing.

dawehner’s picture

Issue summary: View changes

We have a test, so let's remove that from the list of todos

+++ b/core/modules/node/src/Controller/NodeController.php
@@ -187,7 +187,7 @@ public function revisionOverview(NodeInterface $node) {
           '#theme' => 'username',
-          '#account' => $revision->uid->entity,
+          '#account' => $revision->revision_uid->entity,

What about using $revision->getRevisionAuthor() here?

snehi’s picture

Assigned: Unassigned » snehi
snehi’s picture

Please review.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thank you

The last submitted patch, 17: 2495297-17-TEST-ONLY.patch, failed testing.

xjm’s picture

Issue tags: -rc target triage +rc target

Discussed with @effulgentsia. Looking at https://www.drupal.org/files/issues/Revisions_for_An_article___Site-Inst... makes it clear that the behavior in HEAD is not intended. Given that this is hiding information but that it would also be questionable to change what's seen in this UI during a patch release, marking as an RC target.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed a56fa00 on 8.0.x
    Issue #2495297 by jhedstrom, snehi: [regression] Display revision_uid...

  • catch committed a56fa00 on 8.1.x
    Issue #2495297 by jhedstrom, snehi: [regression] Display revision_uid...

Status: Fixed » Closed (fixed)

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