The caching of overwritten EI in environment_indicator_get_active() leads to unexpected results:
* move your site to a new server including DB
* EI of old site from DB is shown
* Only cache-clear leads to overridden EI

Setting prio to high as this nukes the very principle of EI.



rtdean93’s picture

Two different ways to remedy this...

Via Drush...
drush php-eval "cache_clear_all('environment_indicator', 'cache');"

Or in
--- a/all/modules/contrib/environment_indicator/environment_indicator.module
+++ b/all/modules/contrib/environment_indicator/environment_indicator.module
@@ -465,7 +465,7 @@ function environment_indicator_alter_and_cache($env) {
drupal_alter('environment_indicator_matched_indicator', $env);

// Save it to the db cache.
- cache_set('environment_indicator', $env);
+ //cache_set('environment_indicator', $env);
return $env;

catch’s picture

Title: Overwritten EI cached in DB » Environment indicator cache is written on every request
Status: Active » Needs review
1.48 KB

This is a bit more severe than that, it also writes to the cache item every request.

catch’s picture

Title: Environment indicator cache is written on every request » Environment indicator cache is written on every request and uses altered version
678 bytes

Patch cruft.

catch’s picture

721 bytes

And messed up the drupal_alter() call when moving it..

  • e0ipso committed 8c6f611 on 7.x-2.x authored by catch
    Issue #2207897 by catch: Environment indicator cache is written on every...
e0ipso’s picture

I made a minor modification to the patch and committed it. Thanks everyone for your collaboration.

catch’s picture

Status: Needs review » Fixed


Status: Fixed » Closed (fixed)

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

sylus’s picture

Just attaching the revised commit that was pushed here as a patch for drush make purposes off of a stable release. Thanks!