Foreground color doesn't match config

Created on 30 August 2024, 3 months ago

Problem/Motivation

I have set my colors both through the UI and through settings.php and the foreground color is being ignored on my staging server. Thus, I have white text on a bright yellow background, which is utterly unreadable to all but those who already know Drupal well, hence the escalation of this ticket.

Steps to reproduce

My settings.php:

switch ($_SERVER['SERVER_NAME']) {
  case 'example.ddev.site':
    $config['environment_indicator.indicator']['name'] = 'Local';
    $config['environment_indicator.indicator']['bg_color'] = '#006600';
    $config['environment_indicator.indicator']['fg_color'] = '#ffffff';
    break;
  case 'example.develop.example.site':
    $config['environment_indicator.indicator']['name'] = 'Development';
    $config['environment_indicator.indicator']['bg_color'] = '#4caf50';
    $config['environment_indicator.indicator']['fg_color'] = '#000000';
    break;
  case 'stage-example.example.example.edu':
    $config['environment_indicator.indicator']['name'] = 'Staging';
    $config['environment_indicator.indicator']['bg_color'] = '#fff176';
    $config['environment_indicator.indicator']['fg_color'] = '#000000';
    break;
  case 'example.example.example.edu':
    $config['environment_indicator.indicator']['name'] = 'Live';
    $config['environment_indicator.indicator']['bg_color'] = '#0f0f0f';
    $config['environment_indicator.indicator']['fg_color'] = '#ffffff';
    break;
}

Instances of "example" obviously replace client info which I cannot share. Here are similarly redacted screenshots of my settings page:

Proposed resolution

Should correctly pick up the foreground color and assign it to all the expected elements.

Remaining tasks

Fix. 🀣 (sorry, couldn't help myself πŸ˜‚)

User interface changes

None.

API changes

Assume none.

Data model changes

Assume none.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States seanr

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024