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
Right now revisionable entity types are required. Content moderation is still useful without revisions, but they loose the ability to create forward revisions.
Proposed resolution
Add support for non-revisionable entities.
Make it clear the behavioural differences between the two, possibly in a follow up.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | 2850627-non-revisionable-entity-types-2.patch | 10.67 KB | Sam152 |
Comments
Comment #2
Sam152 CreditAttribution: Sam152 at PreviousNext commentedI think this patch is far from ready, but these are the changes required to be able to use the basic moderation features on a non revisionable entity type. I think this will at the very least help evaluate if the added complexity is worth the benefit here.
My gut feeling right now is that it isn't.
Comment #3
timmillwoodI wouldn't say "far from ready", looks pretty close to me, but I think we need to work out how we enable moderation on these entity types (#2843083: Select entity type / bundle in workflow settings) and if we should limit which entity types it works with (#2851228: Warn users of what features are not available on a given entity type). I wonder how the patch in #2 handles config entities.
Comment #4
Sam152 CreditAttribution: Sam152 at PreviousNext commentedComment #5
timmillwoodI wonder if the need to moderation on non-revisionable entity types is worth the extra code and all the extra
isRevisionable()
checks.Comment #6
tacituseu CreditAttribution: tacituseu commentedAlternatively, instead of trying to make ContentModeration handle all possible cases/combinations, create separate/simpler workflow types for them ?
Comment #7
Sam152 CreditAttribution: Sam152 at PreviousNext commentedThe workflow type is a pretty small piece of the overall puzzle. Most of the code that actually make the whole process work has lots of touch-points with the rest of Drupal. I don't think that would cleanly translate across to a simpler version, for simpler entity types.
Comment #8
vijaycs85Nice clean up.
we could use $entity_id available above.
Comment #9
timmillwoodCircling back to this and giving it some more thought.
I still stand by my comment in #5, I'm not sure it's really worth it. I think I would rather see us depend on "EditorialContentEntityBase" for Content Moderation to make sure entities were revisionable and publishable.
As we work to try and stabilize Content Moderation I think we need to try to guide decisions and have sensible defaults. One of the key reasons to use Content Moderation is forward revisions, this is not possible without revisions.
Can we set to "Closed (Works as designed)"?
Comment #10
Sam152 CreditAttribution: Sam152 at PreviousNext commentedAgree, lets put this idea to bed.