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.
Problem/Motivation
Environment Indicator is throwing errors such as:
Notice: Undefined index: switcher in template_preprocess_environment_indicator() (line 139 of /home/d1sya/www/sites/default/modules/environment_indicator/environment_indicator.module).
I am able to reproduce on a simplytest.me site. The only happens when the environment indicator does not use an integration, and prints itself to the page, and with no "switcher" setup.
Easiest way to reproduce:
- Create a new site on simplytest.me
- Enable environment indicator
- Add permission to view Environment Indicator to anonymous and authenticated
- Open a page in an incognito window, and check the log
Comment | File | Size | Author |
---|---|---|---|
#2 | php_warning_undefined-2834459-2.patch | 643 bytes | dpagini |
Comments
Comment #2
dpagini CreditAttribution: dpagini commentedI have no idea if I'm doing this right, but here is an attempt at a patch for this... all feedback welcome!
Comment #3
trwill CreditAttribution: trwill commentedComment #4
trwill CreditAttribution: trwill commentedSaw the same issue - pulled down patch via composer and applied to project. Works great, thanks!
Comment #5
trwill CreditAttribution: trwill commentedComment #7
e0ipsoThanks all! This was fixed!