Problem/Motivation

The workspace entity type uses string IDs, which prevents it from being moderated by the Content Moderation module, which, at the moment, relies on the content_moderation_state entity type and it uses an integer field for the moderated entity ID.

Proposed resolution

Ensure that moderation can not be enabled for the workspace entity type by removing its moderation handler.

Remaining tasks

Review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.

Comments

amateescu created an issue. See original summary.

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB
new2.07 KB

This should do it.

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

fabianx’s picture

Status: Needs review » Reviewed & tested by the community

RTBC - looks great to me.

catch’s picture

Status: Reviewed & tested by the community » Needs work

This looks like the wrong place to do this - although we already do similar for taxonomy terms in taxonomy_entity_type_alter() - we're scattering knowledge about content_moderation around in modules that are altering their own entity definitions, that have already been altered by content moderation.

Can we exclude these in content_moderation itself? I don't think it's possibly to distinguish between integer and string entity type IDs so probably can't auto-detect that.

anmolgoyal74’s picture

Status: Needs work » Needs review
StatusFileSize
new1.14 KB
new2.35 KB
new1.82 KB

Not sure if this is expected.
Tried to exclude the workspace entity type in core/modules/content_moderation/src/EntityTypeInfo.php.

The last submitted patch, 6: 3192363-6-test-only.patch, failed testing. View results

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me :) Not sure if @catch meant that we should also move the exclusion of taxonomy terms in this issue or in a followup, but let's keep the smaller scope for now.

The last submitted patch, 6: 3192363-6-test-only.patch, failed testing. View results

  • catch committed fe00564 on 9.2.x
    Issue #3192363 by anmolgoyal74, amateescu: Ensure that moderation can...

  • catch committed cc892a4 on 9.1.x
    Issue #3192363 by anmolgoyal74, amateescu: Ensure that moderation can...
catch’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Opened a follow-up for taxonomy #3204883: Move exclusion of taxonomy terms from moderation to content_moderation module.

Committed/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!

Status: Fixed » Closed (fixed)

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