Like the module very much. I installed the module 8.x-3.0 (using composer). The module works and allow to add environments, set the color and switch. The toolbar color doesn't change and stay black regardless of the color set.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

shaisamuel created an issue. See original summary.

e0ipso’s picture

Issue summary: View changes
PlayfulWolf’s picture

The same

braindrift’s picture

Same here.

Possible workaround is to define the values in the settings.local.php (see README.md)

$config['environment_indicator.indicator']['bg_color'] = '#268800';
$config['environment_indicator.indicator']['fg_color'] = '#ededed';
$config['environment_indicator.indicator']['name'] = 'Local Dev';
shaisamuel’s picture

#4 worked for me. Thank you

couloir007’s picture

I don't have access to the settings file on production but want to set an indicator for it. Why have the settings page if it doesn't work? I would think it should work or not be there.

e0ipso’s picture

Status: Active » Postponed (maintainer needs more info)

The toolbar color is set using JavaScript. Please check for any JS errors in you console.

sagesolutions’s picture

Status: Postponed (maintainer needs more info) » Needs review

In the images, it looks like you have configured environments for quick switching.

To change the top bar, you need to go to /admin/config/development/environment-indicator/current to configure the current environment.

Upon saving the form, your black menu bar with be set accordingly.

Please try it out and see if this fixes the problem.

Thanks,
Mike

monymirza’s picture

Status: Needs review » Reviewed & tested by the community

#8 works but need Environment indicator UI module need enable.

galactus86’s picture

I think it would be really helpful to document on the module page a little more clearly. For instance if you have a local.settings.php file then you don't get the tab for Current Environment when you first enable this module.

e0ipso’s picture

Status: Reviewed & tested by the community » Fixed

#8 is correct. Thanks for the clarifications.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

couloir007’s picture

For my Pantheon, which is what I was trying to figure out, this works. In the settings.pantheon.php:

if (defined('PANTHEON_ENVIRONMENT')) {
  if (in_array($_ENV['PANTHEON_ENVIRONMENT'], array('dev'))) {
    $config['environment_indicator.indicator']['bg_color'] = '#5d2888';
    $config['environment_indicator.indicator']['fg_color'] = '#ffffff';
    $config['environment_indicator.indicator']['name'] = 'Pantheon Dev';
  }
  if (in_array($_ENV['PANTHEON_ENVIRONMENT'], array('test'))) {
    $config['environment_indicator.indicator']['bg_color'] = '#fffe00';
    $config['environment_indicator.indicator']['fg_color'] = '#320000';
    $config['environment_indicator.indicator']['name'] = 'Pantheon Test';

  }
  if (in_array($_ENV['PANTHEON_ENVIRONMENT'], array('live'))) {
    $config['environment_indicator.indicator']['bg_color'] = '#f70b0b';
    $config['environment_indicator.indicator']['fg_color'] = '#ffffff';
    $config['environment_indicator.indicator']['name'] = 'Pantheon Production';
  }
}