- 🇺🇸United States smustgrave
Enabled content moderation and workspace modules
Added Article node to workflow
In live workspace created a node with multiple revisions - left all in draft
Switched to stage workspace
Added an alias to the node
Tried to publish content but I get "The Stage workspace can not be published because it contains 1 item in an unpublished moderation state."There a missing step for testing?
- Status changed to Needs review
about 1 year ago 9:50am 27 November 2023 The patch from #28 didn't apply on 10.1.x and porting it as it was didn't work either, thus here a patch that works and applies on 10.1.x. Also updated the steps to replicate in the IS.
- last update
about 1 year ago Patch Failed to Apply - Issue was unassigned.
- Status changed to Needs work
about 1 year ago 3:40pm 27 November 2023 - 🇺🇸United States smustgrave
Can this be converted to an MR please. Changing to development branch.
- First commit to issue fork.
- Merge request !5570Issue #3132022: Tweak content_moderation_workspace_access() to utilise content_entity_type_id. → (Open) created by ankithashetty
- Status changed to Needs review
about 1 year ago 11:35am 28 November 2023 - 🇮🇳India ankithashetty Karnataka, India
- Status changed to Needs work
about 1 year ago 2:11pm 28 November 2023 - 🇳🇱Netherlands ekes
Looking at this for the first time, having encountered it on a site in development, and it seems that this can not only happen if there as explained in the OP:
A non-workflow non-revisionable entity with a revision id that is the same as another different entity type revisionable entity (previous not default) revision id that is in a non-published state (the path_alias and node example)
but also if there is:
Any (including workflow revisionable) entity with a current default state revision id (published) that is the same as another different entity type revisionable entity (previous one not the current default) revision id that is in a non-published state.
eg: A taxonomy term ID 1, Revision 1 Published; and Node 1, Revision 2 Published (but also a Revision 1 not published).The $tracked_revisions https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/conte... returned are going to be
$tracked_revisions = [ 'taxonomy_term' => [1], 'node' => [2] ]
which becomes$tracked_revision_ids = [1, 2]
when queried in the table https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/conte... will return 1 because it is catching the tracked, but no longer relevant node revision.Looking at the base test class ContentModerationStateTest and WorkspacesContentModerationStateTest extend it, only one entity type is tested at a time for this. So it feels like it might be clearer to make a new test that reflects workspaces behaviour more, where several entities of different types are being published at the same time - obviously with some clashing revisions id's included.
- 🇳🇱Netherlands ekes
The MR https://git.drupalcode.org/project/drupal/-/merge_requests/9062#note_352712 against 11.x on #3179199 also fixes this.
- Status changed to Closed: duplicate
4 months ago 12:38pm 16 August 2024 - 🇷🇴Romania amateescu
Closing as a duplicate of 🐛 Content Moderation prevents workspace deployment Needs work , I've transferred the credit over there for people who worked on this issue.