We have a D8 core Content Moderation workflow. When attempting to move content to a published state while looking inside the edit form, this module works as expected, but when changing moderation state from the node preview form (which is a node update), this doesn't happen. I suspect this is related to https://www.drupal.org/project/require_on_publish/issues/2979560, but given that issue, that content moderation is likely to take place in that preview page, I would request that this functionality is made available.
I think the Content Moderation scenario is easier than the Scheduler scenario in that you can throw messages to the user at the time they want to approve something. I'd love to see this either enabled for Content Moderation on update or have this as a setting users can opt to toggle on for these tricker edge cases.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screen Shot 2018-08-20 at 10.48.49 AM.png | 38.46 KB | Snugug |
| #11 | validate-on-content-moderation-update-2986442-11.patch | 2.45 KB | mpriscella |
Comments
Comment #2
mpriscella commentedHave you taken a look at #2849279: Make the moderation control form an entity form so that it validates entities before save? It looks like this might be what you're looking for, but if I'm incorrect please let me know! In any case, I'll be looking into the
content_moderationlater tonight to see how they're handling validation.Comment #3
Snugug commentedThat issue may be what I'm looking for! I'll take a look at that, too.
As an aside, thank you so much for this module, it's a sorely lacking piece of functionality in Drupal
Comment #4
mpriscella commentedThank you! Let me know if the above issue works for you, then we can close this issue out.
Comment #5
Snugug commentedI can't get the patch applied (my codebase is on 8.5, this appears to be against 8.6), so I can't test to see if it works :\
Comment #6
Snugug commentedOk! So, I've got the patch applied but it doesn't appear to be validating this when changing content moderation state
Comment #7
mpriscella commentedAh, damn! I'll spin up a test environment and do some investigation.
Comment #8
Snugug commentedThank you!
Comment #9
Snugug commentedTake a look at the comments from last week; in the issue queue for the linked issue they're recommending that the validation constraints for this module are added to the entity itself, as opposed to the entity field, as by design Drupal won't fail on validation for fields that aren't visible.
Comment #10
mpriscella commentedSweet, thanks! Will attempt adding the constraints to the entity itself tomorrow pm.
Comment #11
mpriscella commented@Snugug Added the constraint to the entity itself and everything seems to be in working order, but if you could test the patch with your workflow that would be much appreciated!
Comment #12
Snugug commentedHUZZAH! With the patch from https://www.drupal.org/project/require_on_publish/issues/2986442#comment... applied, and the latest patch from https://www.drupal.org/project/drupal/issues/2849279#comment-12718501 applied, this all appears to be working!
Comment #13
mpriscella commentedGreat!! I'll merge this in today and create a new release! Thanks for your help testing this out!!
Comment #15
mpriscella commentedComment #17
_kash_ commentedThis seems to be not working again. I posted a comment about it with a patch here https://www.drupal.org/project/require_on_publish/issues/3282077#comment...