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
Currently, if core's content moderation module is enabled, and a node is transitioned from one state to another, the revisions tab shows no change:
Proposed resolution
If the content moderation module is enabled, display relevant state change information on the overview form (eg, draft -> published, or similar).
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#8 | 2890116-08.patch | 11.07 KB | jhedstrom |
Comments
Comment #2
jhedstromThis is a first attempt. It now looks like this:
Comment #3
jhedstromI can write a test for this once #2887598: Fix test failing is resolved.
Comment #4
jhedstromHere's a start at some tests. Note these are currently failing due to a core bug: #2899719: Revision/version language on revision listing page is misleading with content moderation enabled.
Comment #6
jhedstromComment #7
jhedstromSince #2899719: Revision/version language on revision listing page is misleading with content moderation enabled is most likely going to be only a label change effort, that need not block this. I've adjusted the tests to take into account when content moderation is enabled, and this should still be green. Still to do is to write some quick tests specific to the display of content moderation states on the revision overview form.
Comment #8
jhedstromThis adds tests specific to content moderation.
Comment #9
timmillwoodLGTM
Comment #10
miro_dietikerHow about starting the diff summary with the published state? Could be displayed as a badge or so, less looking like plain text... Maybe only if the state changed from previous visible revision?
Comment #11
jhedstromDisplaying a badge would be tricky, as the workflow states can be completely changed (can't assume the basic editorial workflow that ships with content_moderation).
Comment #12
johnwebdev CreditAttribution: johnwebdev commentedComment #14
miro_dietikerGreat, committing the added info as-is.
I'm still hoping that core further iterates on the revision tab and we can catch up later.