Action to read value from Settings API

Created on 24 July 2025, 9 days ago

Problem/Motivation

In #3272994: eca_config: Provide actions for reading and writing configuration values , actions were added which read values from the Config API. However, the $settings variable in settings.local.php is often used by site builders for instance-specific configuration, which is not accessible through Config API.

Proposed resolution

Add an action to read from the Settings API and store the result in token, similar to the Config: Read action.
It can potentially be grouped under ECA Misc submodule.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Code

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

Comments & Activities

  • Issue created by @starlight-sparkle
  • 🇩🇪Germany jurgenhaas Gottmadingen

    This is certainly possible, but we've not implemented it yet for a reason. Having access to the settings can potentially be a security risk as ECA would then also have access to the hash which would allow for dangerous things if that got exposed.

  • If access is a concern, what if we require the respective settings keys to be added to a whitelist first?
    Like for instance, the action will only read $settings['some_custom_setting'] if the value $settings['eca_misc']['settings_read_whitelist'] = ['some_custom_setting']; is set.

Production build 0.71.5 2024