Problem/Motivation
The methods WseConfigDatabaseStorage::listAll() and WseConfigDatabaseStorage::getAllCollectionNames() are joining the values of the inner storage with the workspace storage using += operator. This is wrong because the return values are numeric arrays and using += will overwrite existing keys read from the wse storage.
Steps to reproduce
On Vanilla Drupal 9:
- Enable wse_config and asset_injector modules
- Create 2 asset injector CSS configs in the live workspace
- Switch to the stage workspace and create another asset injector CSS config
- Navigate to /admin/config/development/asset-injector/css (still inside the stage workspace) and see only 2 configs instead of the expected 3 (2 of the live workspace + 1 created in the stage workspace)
Proposed resolution
Use array_merge() instead of the += operator to preserve keys when joining the lists.
Issue fork wse-3283735
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
s_leu commentedComment #6
amateescu commentedMerged, thanks!
Comment #8
amateescu commented