Unable to override config through settings.local.php

Created on 12 March 2024, 12 months ago

Problem/Motivation

Config overrides as described in the README.md are not used for reroute_email settings, ie:

$config['reroute_email.settings']['enable'] = TRUE;
$config['reroute_email.settings']['address'] = 'your.email@example.com';

Steps to reproduce

1. Setup a clean Drupal installation
2. Install symfony_mailer, reroute_email and reroute_email_symfony_mailer.
3. Add config overrides as described in the README.md:

$config['reroute_email.settings']['enable'] = TRUE;
$config['reroute_email.settings']['address'] = 'test-mail@example.com';

4. Send a test mail through/admin/config/development/reroute_email/test.
The mail is sent to the default site mail address instead of the overridden config value for "address".

Proposed resolution

Line 60 in src/RerouteEmailHandlerPluginManager.php:

$this->configFactory->get('reroute_email.settings')->getRawData();

Should be changed to:

$this->configFactory->get('reroute_email.settings')->get();

Remaining tasks

Create MR.

User interface changes

None.

API changes

None.

Data model changes

None.

I can create the MR but I'm just wondering if I miss something about the setup before I add the MR.

🐛 Bug report
Status

Active

Version

2.3

Component

Code

Created by

🇳🇱Netherlands SanderJP

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024