Don't remove the buttons or moderation state info from an entity edit form - just enusre everything is disabled.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | content_lock-3026024-9.patch | 542 bytes | ilianoz |
Issue fork content_lock-3026024
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
wim leersI think this is a regression, because AFAICT #2901090: Disable content moderation buttons also fixed this about 1.5 year ago. Probably Content Moderation's implementation in core changed in the mean time.
Ideally, we'd add an explicit functional test for this to prevent this from regressing again.
Comment #3
smustgrave commentedTested on the latest 8.x-2.x
And I'm actually not seeing the moderation state on the locked node.
Comment #5
smustgrave commentedI still can't replicate the original issue but not sure hiding the moderation state is correct either.
With this MR the moderation state is present but still correctly disabled.
Comment #6
smustgrave commentedrebased
Comment #7
alexpottLet's get some test coverage here so we can be sure this works on both Drupal 9 (which we still test on) and Drupal 10. If it only works on Drupal 10 it might be time to cut a new major.
Comment #8
smustgrave commentedMade the recommendation in slack but maybe we do a final release for 8.x-2.x and start a 3.0.x branch. And then we can drop D9 and merge in the change for D11 ticket.
Then can add test coverage for 3.0.x
Comment #9
ilianoz commentedComment #10
nnevillPatch works for me (version 3.0.0-alpha4).
Thanks!
Comment #11
rob230 commentedGot the same problem (of missing moderation state). The MR (or patch #9) fixes it. The content moderation controls are disabled if another user has locked the content, so I'm not sure why they were removed before.
Comment #13
alexpottI've created an MR based on #9 - going to add test coverage.
Comment #14
alexpottThis issue appears to be about two things. The issue summary is a bug report that @smustgrave cannot reproduce. The rest of the issue is a discussion about whether the moderation buttons should appear on not. Note that the module is doing
just above this code. I think we should widen the scope to include discussion of all the buttons like this. And how #disabled on the tope level of a form works and if different browsers have different interpretations of this.
Comment #15
alexpottSo I think the problem here and why the unset is happening is because of code in FormBuilder
I think we need an after build to come it and ensure everything is truly disabled or otherwise this is fragile and probably we we were removing the elements.
Comment #17
alexpottComment #18
alexpottComment #20
alexpottComment #22
alexpottThis is only fixed on 3.x - won;t fix on 2.x because once 3.0.0 we're going to unsupport 2.x