Site Break on Workspace Uninstall

Created on 8 November 2024, 18 days ago

Problem/Motivation

Site Break on Workspace Uninstall

Steps to reproduce

On Drupal 10.3 , Install Paragraph,
create a paragraph type and reference it to the content type.
Install drupal core Workspace Module.
Switch to Stage Instance and create a node [ of the same content type ref. with the paragraph ]
Publish it to the Live.
Then Uninstall the workspace. [ Need to first Remove the workspace Instance ]

Error:-
The website encountered an unexpected error. Try again later.

Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_table.type' in 'field list': INSERT INTO "field_deleted_data_54a97764b3" ("bundle", "entity_id", "revision_id", "langcode", "workspace_target_id", "deleted", "delta") SELECT "entity_table"."type" AS "bundle", "entity_table"."nid" AS "entity_id", "entity_table"."vid" AS "revision_id", "entity_table"."langcode" AS "langcode", "entity_table"."workspace" AS "workspace_target_id", :deleted AS "deleted", :delta AS "delta" FROM "node_revision" "entity_table" WHERE "entity_table"."workspace" IS NOT NULL FOR UPDATE; Array ( [:deleted] => 1 [:delta] => 0 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1605 of

Return and try :- System > Delete orphaned composite revisions

then again try to uninstall workspace module

It will throw error:-
The website encountered an unexpected error. Try again later.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'workspace' in 'where clause': SELECT 1 AS "expression" FROM "block_content_revision" "t" WHERE "workspace" IS NOT NULL LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->countFieldData() (line 1794 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Then Again Try to create a new workspace and delete it.
It will throw error:-
The website encountered an unexpected error. Try again later.

Drupal\Core\Entity\EntityStorageException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.' in 'where clause': SELECT "revision"."revision_id" AS "revision_id", "revision"."id" AS "id" FROM "block_content_revision" "revision" LEFT OUTER JOIN "block_content" "base" ON "revision"."id" = "base"."id" WHERE ("revision"."" IN (:db_condition_placeholder_0)) AND (("revision"."revision_id" >= "base"."revision_id")) ORDER BY "revision"."revision_id" ASC; Array ( [:db_condition_placeholder_0] => testrohannn ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 763 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Also a error message can be seen on site :
Error message
Warning: Undefined array key "target_id" in Drupal\workspaces\WorkspaceAssociation->getAssociatedRevisions() (line 242 of core/modules/workspaces/src/WorkspaceAssociation.php).

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.18

Component

Code

Created by

🇮🇳India rckstr_rohan

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

Comments & Activities

Production build 0.71.5 2024