Problem/Motivation

When creating a config inside a workspace, that config is leaking into other non live workspaces when switching to those. The problem is happening because WseConfigDatabaseStorage::listAllWseConfigs() is loading revisions of config not created inside the current workspace whereas it mustn't do so.

Steps to reproduce

On Vanilla Drupal 9:

  1. Install wse_config and asset_injector modules
  2. Create an additional workspace (in addition to the Stage workspace)
  3. In the Stage workspace create an asset injector CSS config
  4. Switch to the additionally created workspace

Expected behavior: asset injector CSS is not applied/existing inside the second workspace.
Actual behavior: The asset injector is listed and applied in the second workspace.

Proposed resolution

Use the workspace association service and its getTrackedEntities() method to make sure, only revisions of config created in the current workspace are loaded.

Issue fork wse-3283956

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.

amateescu’s picture

Status: Active » Fixed

Merged, thanks!

s_leu’s picture

Status: Fixed » Needs work

Unfortunately there was some problem with this patch, thus re-opening. Will open the new MR shortly

s_leu’s picture

Issue summary: View changes
amateescu’s picture

Status: Needs work » Fixed

Merged the followup :)

s_leu’s picture

Status: Fixed » Needs review

There was another problem with the initial changes which breaks things if there's multiple revisions of a wse_config inside a workspace, thus another MR to fix this.

amateescu’s picture

Status: Needs review » Fixed

Merged this one too :)

Status: Fixed » Closed (fixed)

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

amateescu’s picture

Merged the followup as well :)

amateescu’s picture

Component: Code » Workspace Config