Problem/Motivation
\Drupal\content_moderation\EntityTypeInfo::formAlter() checks the config entity type if it can be moderated, when the content entity type should be checked instead.
Proposed resolution
Fix it and add test coverage.
Remaining tasks
Review.
User interface changes
The 'Create new revision' checkbox on the 'Create content type' screen will now be disabled, as intended by default.
API changes
Nope.
Data model changes
Nope.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 2892967-7.patch | 4.78 KB | sam152 |
| #7 | 2892967-7_TEST_ONLY.patch | 2.18 KB | sam152 |
| #2 | 2892967.patch | 4.72 KB | amateescu |
| #2 | 2892967-test-only.patch | 2.18 KB | amateescu |
Comments
Comment #2
amateescu commentedThis should do it.
Comment #4
timmillwoodGood find @amateescu!
Comment #6
sam152 commentedI logged a similar, but different problem for the Block handler here: #2894765: BlockContentModerationHandler::enforceRevisionsEntityFormAlter sets incorrect keys in form.
This issue will resolve the bundle revision form alter being fixed, but not the entity form. Happy to do in one issue or merge the two.
Comment #7
sam152 commentedWhen in doubt, best not disrupt an RTBC issue. Reroll + back to RTBC.
Comment #8
sam152 commentedAlso, I think this is technically a dupe of #2843380: Remove dead code by way of enforceRevisionsBundleFormAlter, but that issue proposes removing the method from the handler entirely instead of fixing it.
Can close that one once this one is fixed.
Comment #10
timmillwood+1 to still being RTBC
Comment #13
catchCommitted/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!