Now that Content Moderation is in core and pretty stable, Lightning should change over to using it instead of Workbench Moderation.
The current plan is to migrate to Content Moderation sometime during the 8.4.x lifecycle. There are three main pieces to this:
- Getting our current tests to pass with Content Moderation
- Developing a stable migration path
- Making sure Content Moderation is feature complete
Getting our current tests to pass with Content Moderation
This shouldn't be too difficult. We had this more or less working in our experimental branch.
Developing a stable migration path
We've been working with joepurcell to make this happen based off the work sam152 did here in #2846618: Unofficial content_moderation 8.2.x to 8.3.0 upgrade path. That work is being tracked in #2897870: Provide migration path to core Content Moderation and Workflows. It looks like the code will actually have to live in a stand-alone module though. For now that lives on github: https://github.com/josephdpurcell/wbm2cm
Making sure Content Moderation is feature complete
There are three features which need to be committed, or for which we need to bring in working patches: Views integration, Forward translations, and Quick Edit support.
Views Integration
Content Moderation is currently lacking Views integration which is a blocker as table-stakes stuff like showing the moderation state of content in the content list isn't possible. According to the Beta4 release notes, the following issues need to be resolved before we can migrate:
- #2902187: Provide a way for users to moderate content
- #2862041: Provide useful Views filters for Content Moderation State fields
- #2852067: Add support for rendering computed fields to the "field" views field handler
Forward revisions of multiple languages
This has been moved into the followup issue.
Currently, Content Moderation prevents users from creating multiple forward revisions across translations. This is to prevent a situation that exists in Workbench Moderation where if one of those forward revisions gets published, the other pending translations get set to the default revision - resulting in a 403 response for anon users. While this is a major problem in Workbench Moderation, completely preventing more than one forward translation isn't acceptable because some users have already implemented workarounds that rely on that possibility. See Content Translation Workflow module.
Quick Edit support
Currently, quick edit is only available of the default revision of an entity. However, when entities are moderated, only unpublished entities will have their default revision set to draft. Once an entity is published, the default revision will also be published and shouldn't be quick editable. In that case, a forward (unpublished, non-default) revision should be quick editable, but isn't.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 2815221-69-8.4.x.patch | 8.68 KB | phenaproxima |
Comments
Comment #2
balsamaAgreed. We have plans to cut a new experimental branch prior to the 2.1.0 (core 8.3.0) release on 5 April. The goal of that branch is to work to get stuff like this stable and ultimately ported back to the mainline 8.x-2.x branch. Will also need a migration path from WBM -> content moderation. Don't think we have an issue for that yet.
Postponed on: #2862124: Create new Lightning Experimental Branch and move experimental components there and a migration path from WBM to CM.
Comment #3
balsamaComment #4
phenaproxima#2862124: Create new Lightning Experimental Branch and move experimental components there has landed, so...time to unfreeze this bad boy.
Comment #5
balsamaComment #6
balsamaComment #7
xjm#2860097: Ensure that content translations can be moderated independently is a bug that might also need to be taken into account. I don't know if there is an equivalent issue for workbench_moderation, but if workbench_moderation already has a workaround, we might not want to upgrade and regress that.
Comment #8
balsamaGood point re forward revisions and translations. Currently, Lightning recommends using the Content Translation Moderation module (see: http://lightning.acquia.com/blog/forward-revisions-and-translated-content) but we're aware that the workaround there is still buggy - especially for complex workflows.
So right now, WBM (and Lightning Workflow) allow you to create a situation where you do have multiple forward revisions. And publishing one of those results in unexpected behavior. So I'm inclined to say that the workaround CM currently has in place (that is, disallowing that situation from arising) is better than the current situation.
We have at least one large organization currently using Lightning Workflow with an extremely complex (but totally reasonable) workflow. I'll reach out to them and see what the ramifications would be of us _not_ blocking on this.
Comment #9
balsamaNow that I think about this a little more, we _do_ offer a workaround for WBM, even if it is buggy and unsupported. Migrating to CM would mean pulling the rug out from under people who are using that workaround. So I think I've changed my mind here... and I _am_ inclined to block on a solution (patch or otherwise) for forward revisions and translated content. Will update the IS once we get a consensus.
Comment #10
balsamaIf we're blocking on Views and Forward Translations, it probably makes sense to block on #2815221: Add ability to use Quick Edit to the latest_revision route as well.
Comment #11
balsamaComment #12
phenaproximaComment #13
phenaproximaHere's a reroll of #2815221-69: Add ability to use Quick Edit to the latest_revision route for 8.4.x -- we'll need it.
Comment #14
sylus commentedHi amazing Lightning team!
Is there anything I can do to help move this issue along? We are 2-3 weeks away from launching our new Drupal 8 site based on lightning for open.canada.ca.
Unfortunately we have a huge blocker due to workbench moderation, which surprisingly I can't replicate in content moderation. Essentially the bug makes the site unusable for users other then administrators in postgresql. https://www.drupal.org/project/drupal/issues/2920527
We are already on the Lightning 2.2.3 release with Drupal 8.4.2. Right now I am trying to decide if best to wait till this gets it in or try to backport some logic from content moderation to workbench moderation. Though I don't relish updating about 8000 nodes etc from workbench to content moderation :P
Thanks for any information you can provide :)
Comment #15
balsamaHi. Our current target is 6 December for this. So that might be cutting it close for you. But this update path will be FAR better then trying roll your own or backport stuff.
We might have a branch as early as tomorrow that you could use for testing which would help (we could even throw an alpha tag on it if that helps). But no guarantees.
FWIW, it's going well, and I expect to hit the 6 Dec date. It'd be great if you could help test though, so I'll try to ping you when we have a branch up.
Comment #16
sylus commentedThank you for the response and that is awesome news about the progress!
Count me in to help with any testing.
I wasn't making progress on determining why content moderation doesn't have the issue so happy this is even an option.
My situation is easier as I have everything automated through migrate + migration subscribers etc so the upgrade from content that existed in workbench and then being converted to content moderation isn't an issue. Though I'd happily test the update path for you too.
Thanks again!
Comment #17
sylus commentedGot my two repos successfully testing off of your dev-content-moderation-migration branch and followed the same adjustments that was made in your profile:
https://github.com/open-data/od/pull/197
https://github.com/drupalwxt/wxt/pull/95
Will be giving it some review tomorrow :)
Comment #18
balsamaCurrent known regressions:
Of those, #2 and #3 are our highest priority. This is based on the 2.2.4-alpha2 tag. You can test against that tag, or HEAD of the content-moderation-migration branch.
Comment #19
sylus commentedJust chiming in after testing, that my postgresql bug is indeed gone with content moderation, so that was a huge release blocker at least for me now gone. Based on your list only #1-#3 are important for me, as for right now we disable lightning_scheduled_updates and as mentioned the upgrade from workbench => content moderation isn't needed as I'll just be migrating on top of content moderation.
Just wanted to say thanks for all of your work on this. The update path was pretty easy and just from following your P.R. could easily determine the changes that needed to be made. Though I noticed that status went from hidden: true to displayed. I assume content moderation is overriding that area now.
It looks like the views patches are mostly ready to go?
Comment #20
balsamaI've opened several child issues and will open up a single meta followup for remaining tasks before we tag 2.2.4. But I think this initial migration task is ready for review.
2.2.4-alpha4 is tagged and ready for testing.
Comment #21
balsamaFollowup meta issue: #2927364: [META] Improve Content Moderation integrations
Comment #23
balsamaComment #24
balsama