Problem/Motivation
If I attempt to publish a workspace that contains new unpublished/non-default revisions (e.g. new forward drafts) then I get a cryptic error message:
The Stage workspace can not be published because it contains 1 item in an unpublished moderation state.
This is super cryptic, mostly because I have no easy way to know which of my changes are unpublished.
Proposed resolution
Change /admin/config/workflow/workspaces/manage/stage

1. Add a new column for "Status"
2. If an item is unpublished, also show a ⚠️ icon
3. At the bottom of the page show a message: "⚠️ This workspace cannot be published until all unpublished items are published."
This code is in \Drupal\workspaces\WorkspaceViewBuilder::buildComponents()
Remaining tasks
All.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screenshot 2026-05-21 at 12.03.20.png | 140.63 KB | markconroy |
| #12 | Screenshot 2026-05-21 at 12.03.03.png | 146.53 KB | markconroy |
| #12 | Screenshot 2026-05-21 at 12.02.43.png | 184.94 KB | markconroy |
| #12 | Screenshot 2026-05-21 at 09.00.57.png | 165.32 KB | markconroy |
| #12 | Screenshot 2026-05-21 at 09.00.33.png | 169.47 KB | markconroy |
Issue fork drupal-3376702
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dalinThe error message comes from
content_moderation_workspace_access()and a code comment says "Check if any revisions that are about to be published are in a non-default revision moderation state."Comment #4
amateescu commentedImprovements to the Workspaces / CM integration are tracked here: #3085747: Consider improving the default editorial experience when Content Moderation and Workspaces are used together
Comment #5
danflanagan8My content authoring team is asking for this same UX enhancement.
It looks like
content_moderation_workspace_access()was removed in #3242564: Workspaces can't be published from the command line in favor of a new event subscriber and methodWorkspaceSubscriber::onWorkspacePrePublish(). So that's where the logic is happening now.Comment #6
danflanagan8In case it helps anybody, I altered the Workspace display with a hook like so:
I restricted my check to nodes because we don't moderate anything else. A more sophisticated check could be used on sites that moderate of entity types.
It ends up looking something like this:
Comment #9
markconroy commented@danflanagan8 I think the issue is that the content that is stopping the publication of the workspace is in 'Draft' (via content moderation) rather than 'Unpublished'.
I'll create an MR to show the name(s) of the item(s) in draft.
Comment #11
markconroy commentedComment #12
markconroy commentedScreenshots
Current state
The current state only tells us that "something" is blocking publication, but not "what" is blocking publication.
1 item blocking
Multiple items blocking
New state
If 1 item is blocking, the name of it and a link to it is appended to the end of the message.
If more than 1 item is blocking, we create a list of all the blocking items, with each linked to their canonical URL.
Published
Once everything is published, we continue with the same experience we currently have.