Ensure the "Moderation control" field only acts on the entity currently being viewed

Created on 9 August 2024, 3 months ago

Problem/Motivation

There's a bit of an edge case where if you have an entity page making use of the "Moderation control" field, and the page contains a view of other entities (equally with Moderation control fields available) and rendered using the "Content" style

Steps to reproduce

Create an unpublished node with the "Moderation control" field enabled.

Create two more unpublished nodes.

Then attach a view on that node page through layout builder or equivalent that renders those two unpublished nodes using a "Content" on a display mode that also has the "Moderation control" field set resulting in 3 moderation controls on the page.

Any form submissions will only affect the first entity within the form rather than the specific one in question.

Proposed resolution

Two options are available:

Ensure the form field only processes submissions for the specific entity the relevant form belongs to or only attach the field form on the "full" display mode of the relevant entity.

Remaining tasks

Provide issue fork/patch.

User interface changes

N/A

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Content moderation 

Last updated about 23 hours ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024