Publication failed error in workspaces when content moderation is enabled

Created on 8 July 2024, 5 months ago
Updated 21 August 2024, 4 months ago

Problem/Motivation

I'm not able to fully publish a workspace if content moderation is enabled. Initially assumed this would be a known issue but I gather from #2971699: Content Moderation and Workspace don't work together and a few other issues that they should work, so maybe it's new? Couldn't find a duplicate.

Steps to reproduce

  1. Install Drupal 11 (beta currently)
  2. Install Workspaces
  3. Create some content in stage, publish stage, all good
  4. Install Content moderation and Workflows (note that you don't have to enable any workflows to get the error)
  5. Create some content in stage, try to publish, get error:


    Full error is:
    SQLSTATE[HY000]: General error: 1 near ")": syntax error: SELECT COUNT(*) AS "expression" FROM (SELECT 1 AS "expression" FROM "content_moderation_state_revision" "base_table" INNER JOIN "content_moderation_state_field_revision" "content_moderation_state_field_revision" ON "content_moderation_state_field_revision"."revision_id" = "base_table"."revision_id" WHERE ("content_moderation_state_field_revision"."content_entity_revision_id" IN (:db_condition_placeholder_0)) AND () GROUP BY "base_table"."revision_id", "base_table"."id") "subquery"; Array ( [:db_condition_placeholder_0] => 9 )
  6. Uninstall Content moderation
  7. It works again

Proposed resolution

Remaining tasks

  1. Confirm this should be working?
  2. Create a fix with tests
  3. Review MR
  4. Commit

Release notes snippet

🐛 Bug report
Status

Closed: duplicate

Version

11.0 🔥

Component
Workspaces 

Last updated about 2 hours ago

No maintainer
Created by

🇦🇺Australia pameeela

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

Comments & Activities

Production build 0.71.5 2024