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.
The caching of overwritten EI in environment_indicator_get_active() leads to unexpected results:
* move your site to a new server including DB
Result:
* 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.
Comment | File | Size | Author |
---|---|---|---|
#9 | environment_indicator-2207897-9.patch | 1.03 KB | sylus |
#4 | 2207897.patch | 721 bytes | catch |
#3 | 2207897.patch | 678 bytes | catch |
#2 | 2207897.patch | 1.48 KB | catch |
Comments
Comment #1
rtdean93 CreditAttribution: rtdean93 commentedTwo 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;
}
Comment #2
catchThis is a bit more severe than that, it also writes to the cache item every request.
Comment #3
catchPatch cruft.
Comment #4
catchAnd messed up the drupal_alter() call when moving it..
Comment #6
e0ipsoI made a minor modification to the patch and committed it. Thanks everyone for your collaboration.
Comment #7
catchThanks!
Comment #9
sylus CreditAttribution: sylus commentedJust attaching the revised commit that was pushed here as a patch for drush make purposes off of a stable release. Thanks!