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.

Comments

amateescu created an issue. See original summary.

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new2.18 KB
new4.72 KB

This should do it.

The last submitted patch, 2: 2892967-test-only.patch, failed testing. View results

timmillwood’s picture

Status: Needs review » Reviewed & tested by the community

Good find @amateescu!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 2892967.patch, failed testing. View results

sam152’s picture

I 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.

sam152’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new2.18 KB
new4.78 KB

When in doubt, best not disrupt an RTBC issue. Reroll + back to RTBC.

sam152’s picture

Also, 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.

The last submitted patch, 7: 2892967-7_TEST_ONLY.patch, failed testing. View results

timmillwood’s picture

+1 to still being RTBC

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • catch committed 42c492c on 8.5.x
    Issue #2892967 by amateescu, Sam152: \Drupal\content_moderation\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!

  • catch committed 2836f7e on 8.4.x
    Issue #2892967 by amateescu, Sam152: \Drupal\content_moderation\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.