Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After update to Drupal 8.2.1 Environment Indicator Switcher didn't work anymore.
The Link in the toolbar is only a link, seems there is know event listener to switch the links in the tray.
In environment_indicator_toolbar(), if i change:
$items['environment_indicator'] += [
'tab' => [
'#type' => 'link',
'#access' => $permission,
'#title' => $title,
'#url' => \Drupal\Core\Url::fromRoute('environment_indicator.settings'),
'#options' => [
'attributes' => [
'title' => t('Environments'),
'class' => [
'toolbar-icon',
'toolbar-item',
'toolbar-icon-environment',
],
],
],
], ...
to
$items['environment_indicator'] += [
'tab' => [
'#type' => 'link',
'#access' => $permission,
'#title' => $title,
'#url' => \Drupal\Core\Url::fromRoute('environment_indicator.settings'),
'#attributes' => [
'title' => t('Environments'),
'class' => [
'toolbar-icon',
'toolbar-item',
'toolbar-icon-environment',
],
],
], ...
it works.
But the colors in the tray are still gone.
Comment | File | Size | Author |
---|---|---|---|
#5 | environment_indicator-2820776-tabs_broken-05.patch | 1.85 KB | nicrodgers |
Comments
Comment #2
uwe_k CreditAttribution: uwe_k commentedComment #3
nicrodgersComment #4
nicrodgersI've replicated this with the latest 8.x-3.x dev version of the module, and with:
* Drupal Core 8.2.3
* Drupal Core 8.2.1
* Drupal Core 8.2.0
Tested working ok in:
* Drupal Core 8.1.0
* Drupal Core 8.1.7
Updating the issue title to reflect.
Comment #5
nicrodgersComment #6
nicrodgersI've tested the patch in 8.2.x and 8.1.x and with the patch applied it seems to work ok now.
Comment #7
e0ipsoThanks for the report and the patch! I'll be merging soon.
Comment #9
e0ipso