Allow people to publish while viewing a draft piece of content (or do other workflow state transitions such as made possible by content moderation, from a view mode not having to go into the edit page)
First step is seeing the form.
- node template moderation controls
- content moderation controls twig Drupal 8
Solution:
Add this to your custom node template:
{{ content.content_moderation_control }}
(If you’re already printing {{ content }}
you don’t need to do this, it’ll just work.)
Solution from https://www.drupal.org/project/drupal/issues/3066142
Also needs the answer: https://www.drupal.org/forum/support/post-installation/2018-08-09/drupal-8-content-moderation-missing-options-to-publish
But it turns out we can’t use it for Find It because
- moderation controls bypass form validation
- moderation control pseudofield bypass
- moderation controls valiadate
- moderation controles don’t validate for form and entity constraints
Result: Content is published without required fields.
Expected result: Validation runs and message is given that required field must be provided.
And the controls go away when the item content is published, whether you want them to or not, and i guess… that’s a feature?