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:
- Install wse_config and asset_injector modules
- Create an additional workspace (in addition to the Stage workspace)
- In the Stage workspace create an asset injector CSS config
- 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
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 #3
amateescu commentedMerged, thanks!
Comment #4
s_leu commentedUnfortunately there was some problem with this patch, thus re-opening. Will open the new MR shortly
Comment #6
s_leu commentedComment #7
amateescu commentedMerged the followup :)
Comment #9
s_leu commentedThere 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.
Comment #10
amateescu commentedMerged this one too :)
Comment #13
amateescu commentedMerged the followup as well :)
Comment #14
amateescu commented