Skip to content
Snippets Groups Projects
Commit 6d0d7dcc authored by Wolfgang Ziegler's avatar Wolfgang Ziegler
Browse files

Issue #3439981: Do not flush theme registry when uploading a file to media library.

parent 0299bec9
No related branches found
No related tags found
1 merge request!7420Issue #3439981 by petar_basic, fago: Do not flush theme registry when uploading a file to media library.
......@@ -298,10 +298,12 @@ public function flush($path = NULL) {
$module_handler = \Drupal::moduleHandler();
$module_handler->invokeAll('image_style_flush', [$this, $path]);
// Clear caches so that formatters may be added for this style.
\Drupal::service('theme.registry')->reset();
Cache::invalidateTags($this->getCacheTagsToInvalidate());
// Clear caches when the complete image style is flushed,
// so that field formatters may be added for this style.
if (!isset($path)) {
\Drupal::service('theme.registry')->reset();
Cache::invalidateTags($this->getCacheTagsToInvalidate());
}
return $this;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment