The form that appears at node/%/latest should not be hard-coded into the page for all content types
It should (perhaps optionally) be wrapped inside a block.
If the maintainers would like, this can be an optional switch that turns off the form delivery at node/%/latest while providing the block.
That would be at admin/structure/types/manage/%/moderation where % is the content type being configured.
Current users should be able to continue using the system as-is and other users can have a block that they'll place wherever they think it makes sense.
A warning should inform users that checking this checkbox means the workbench moderation form is going away, preferably before submitting the form, so that they know the form is going away and it will need to be put into place via the block.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | interdiff-2685163-19-21.txt | 951 bytes | samuel.mortenson |
| #21 | 2685163-21.patch | 20.16 KB | samuel.mortenson |
| #6 | 2685163-6.patch | 6.9 KB | devin carlson |
Comments
Comment #2
saltednutComment #3
saltednutComment #4
saltednutTo be honest, I am not sure if it should be a global setting or a per-content-type setting really. I guess its two things. One: hiding the form for some content types and Two: giving us the form as a block.
Comment #5
Crell commentedForm in block is just that: A block, use it or not. Disabling the form seems like a per-bundle toggle; especially since we only support per-bundle-level configuration right now. :-)
Comment #6
devin carlson commentedAn initial attempt with test coverage for the testbot.
Comment #7
saltednutYou can inherit the node context and you may not need the RouteMatchInterface.
$node = $this->getContextValue('node');
Comment #8
devin carlson commentedAn updated patch to address #7 and include a per-bundle configuration option for displaying the moderation information on the "latest version" tab.
Comment #12
jibranComment #14
saltednutIf we're going for clarity with this re-title...
Comment #15
devin carlson commentedA reroll of #8 to incorporate the latest changes and add context information to the block test.
Comment #19
devin carlson commentedFixed the test failure.
Comment #20
saltednutOne issue I am finding in testing this: We redirect users to node/%/latest whenever a [insert_state_here] is transitioned to "draft" -- however, if there is no published version of the node, then the draft shows up at node/% -- and you get an access denied error trying to visit node/%/latest
Example to try:
Edit: This is likely happening because the original form assumes one is always at node/%/latest where it originally lived before we introduced this more flexible block that could occur just about anywhere, regardless of current state.
Comment #21
samuel.mortensonMinor update - I noticed that when using the Block no Entity validation was being run, which would allow for users to move Entities to invalid states. This update adds a validation method to the EntityModerationForm, which prevents users from circumventing the ModerationStateValidator.
Comment #24
samuel.mortensonSee #2779191: ALL Tests for php 5.5 and 5.6 are FAILING for test failure details.
Comment #25
mstrelan commentedVariable name for type hinting is wrong, should be
@var $node.