Whitelist config items

Created on 26 February 2025, about 1 month ago

Problem/Motivation

In some cases whitelisting forms in not sufficient. I. e. whitelisting *.menu.* in combination with Don't block content menu links reordering Needs review works, but if you use the Simple XML Sitemap module and have it enabled for the menu_link_content entity type it doesn't. This is because when saving the menu form it wants to save some of it's configuration whether that has changed or not. And if it has changes they should be saved to update the sitemaps accordingly to the menu changes.

Steps to reproduce

Install config_readonly and config_readonly_menu_ui (or alternatively apply the patch from Don't block content menu links reordering Needs review ).
Install simple_sitemap and enable it for the menu_link_content entity type.
Make the configuration readonly.
Change some menu items (activate/deactivate, re-order, ...) and save.
Check the logs for Drupal\config_readonly\Exception\ConfigReadonlyStorageException: Your site configuration active store is currently locked errors.

Proposed resolution

Implement a whitelist for config entities in the same way as the whitelist for forms.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇦🇹Austria mvonfrie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024