Alternative moderation_state field widgets do not receive the same access/visibility treatment as the default ModerationStateWidget.

Created on 11 October 2017, about 7 years ago
Updated 4 January 2024, 12 months ago

Problem/Motivation

Currently we add a base field to entity types and then hide the moderation_state widget if the specific entity we are editing isn't being moderated. Some bundles may have moderation switched off. The way we do this is with a check in our widget, but this doesn't protect other widgets and can cause a fatal with the following steps:

  1. drush si standard && drush en content_moderation
  2. Edit the Article form display, change the widget to "Textfield".
  3. Save any article, see a fatal.

Proposed resolution

Use field access for controlling if the field should appear or not.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Content moderationΒ  β†’

Last updated 24 days ago

  • Maintained by
  • πŸ‡¦πŸ‡ΊAustralia @Sam152
Created by

πŸ‡¦πŸ‡ΊAustralia Sam152

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024