Skip to content

Instantly share code, notes, and snippets.

@podarok
Last active July 14, 2021 13:53
Show Gist options
  • Save podarok/41a0df40e3db2c809b7396bda8bc1c85 to your computer and use it in GitHub Desktop.
Save podarok/41a0df40e3db2c809b7396bda8bc1c85 to your computer and use it in GitHub Desktop.
move_extension_list_reset.diff
diff --git a/core/includes/common.inc b/core/includes/common.inc
index f640a90121..a1397dd9c3 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -553,15 +553,15 @@ function drupal_flush_all_caches($kernel = NULL) {
// to reset the theme manager.
\Drupal::theme()->resetActiveTheme();
+ // Rebuild module data that is stored in state.
+ \Drupal::service('extension.list.module')->reset();
+
if (!$kernel instanceof DrupalKernel) {
$kernel = \Drupal::service('kernel');
$kernel->invalidateContainer();
$kernel->rebuildContainer();
}
- // Rebuild module data that is stored in state.
- \Drupal::service('extension.list.module')->reset();
-
// Rebuild all information based on new module data.
\Drupal::moduleHandler()->invokeAll('rebuild');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment