Problem/Motivation
The current code in WseConfigDatabaseStorage::readMultiple is proceeding to call WseConfigDatabaseStorage::getOverriddenNames even if all the read config is ignored. This is problematic and may lead to infinite loops in case another module is reading config in any code that alters queries for example.
It currently happens for example when wse_config and trash are enabled at the same time because trash is reading a config in TrashManager::isEntityTypeEnabled which is called somewhere after WseConfigDatabaseStorage::getOverriddenNames.
Steps to reproduce
- Enable the Trash module on a Drupal project with WSE/Workspaces
- Navigate to workspace settings at /admin/config/workflow/workspaces/settings, select some additional config entity types (see screenshot attached below) and save.
- Navigate to home
- Create a new workspace via clicking on the admin toolbar's workspace tab, then clicking + Add new workspace and submitting the modal form that pops up with any workspace name
- Observe: infinite loop and memory exhausted errors due to that
Proposed resolution
Don't proceed loading overrides when all read configs are ignored in wse_config.
Remaining tasks
Write test
Issue fork wse-3584100
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 #4
s_leu commentedComment #7
amateescu commentedConverted the new test to a kernel one, and merged. Thanks!