Problem/Motivation

Config entities created inside workspaces can't be deleted due to the validation in WorkspaceAssociation::isEntityDeletable() as workspace config never has a default revision that is unpublished because it's only ever used inside a workspace, never in live.

Steps to reproduce

  1. Switch to the “Stage” workspace if it exists, otherwise create it
  2. At /admin/config/development/asset-injector/css/add (ensure you’re NOT in the live workspace), create a new asset_injector CSS config pasting the CSS definitions above into the “Code” field and save it (choose any Label and leave all the other fields as they are)
  3. After saving, the inner part of every the page has to appear in yellow as long as you are in the Stage workspace.
  4. If not there yet, navigate to /admin/config/development/asset-injector/css and make sure the created CSS asset injector config is displayed in the list.
  5. Now delete the newly created CSS injector
  6. Observe the success message for deletion will appear but css injector won’t delete

Proposed resolution

Extend WseWorkspaceAssociation::isEntityDeletable() with a special condition for wse_config that allows deleting of this entity type no matter what.

Issue fork wse-3291012

Command icon 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

s_leu created an issue. See original summary.

s_leu’s picture

Issue summary: View changes
s_leu’s picture

Issue summary: View changes

s_leu’s picture

Status: Active » Needs review
amateescu’s picture

Status: Needs review » Fixed

Merged, thanks :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

amateescu’s picture

Component: Code » Workspace Config