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.
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
Comment | File | Size | Author |
---|---|---|---|
#21 | interdiff-2495297-17-21.txt | 724 bytes | snehi |
#21 | 2495297-21.patch | 2.41 KB | snehi |
#17 | 2495297-17.patch | 2.41 KB | jhedstrom |
#17 | 2495297-17-TEST-ONLY.patch | 1.71 KB | jhedstrom |
Comments
Comment #1
jhedstromComment #2
jhedstromThis 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.
Comment #3
jhedstromOops, the screenshot indicates an obvious bug in the patch.
Comment #4
jhedstromThis patch resolves that issue.
Comment #8
jhedstromComment #9
jhedstromComment #10
shwetaneelsharma CreditAttribution: shwetaneelsharma at Axelerant commentednode-revision-overview-show-editor-2495297-04.patch does not apply any more. Changing the status to needs work.
Comment #11
Bojhan CreditAttribution: Bojhan commentedWhat? shouldn't it always show who edited. Thats much more relevant?
Comment #12
jhedstromProbably. 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.
Comment #13
jhedstromI 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.
Comment #14
jhedstromComment #15
jhedstromHere's a test.
Comment #16
jhedstromOops, unused use statement.
Comment #17
jhedstromOops, the test was looking for the original author in both instances.
Comment #19
dawehnerWe have a test, so let's remove that from the list of todos
What about using
$revision->getRevisionAuthor()
here?Comment #20
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedComment #21
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedPlease review.
Comment #22
dawehnerThank you
Comment #24
xjmDiscussed 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.
Comment #25
catchCommitted/pushed to 8.0.x, thanks!