Creating a published moderated entity in a workspace shouldn't make it published in Live

Created on 14 November 2024, 5 months ago

Problem/Motivation

With Content Moderation and Workspaces enabled, creating a published moderated entity in a workspace will create the default revision as published. This is a regression from πŸ› Newly added menu links are invisible until published Fixed and it's caused by CM's presave hook running after the one from Workspaces.

This issue was initially reported to the Security team, and it was cleared for being fixed in the public queue.

Steps to reproduce

1. Fresh install of Drupal 10.3.5
2. Enable Content Moderation and Workspaces
3. Enable all content for the editorial workflow at /admin/config/workflow/workflows/manage/editorial
4. Activate the Stage workspace
5. Create a basic page, set the moderation state to Published, and save it
6. Fire up anonymous browser
7. Go to /node/1

Proposed resolution

Workspaces needs to alter the publishing status after Content Moderation. Additionally, during the double-revision creation process, Workspaces should enforce that the initial default revision is unpublished.

Remaining tasks

Review.

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

workspaces.module

Created by

πŸ‡·πŸ‡΄Romania amateescu

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