Issue #3460598 by catch, m4olivei, penyaskito, finnsky: Single directory component CSS asset library not picked up in admin theme immediately after module install without cache clear

(cherry picked from commit 2cf5bf3270)
merge-requests/9004/head
nod_ 2024-07-28 03:10:57 +02:00
parent 554f305ce5
commit ce7628b484
No known key found for this signature in database
GPG Key ID: 76624892606FA197
1 changed files with 5 additions and 0 deletions

View File

@ -352,6 +352,11 @@ class ModuleInstaller implements ModuleInstallerInterface {
// @see https://www.drupal.org/node/2208429
\Drupal::service('theme_handler')->refreshInfo();
// Modules may provide single directory components which are added to
// the core library definitions rather than the module itself, this
// requires the library discovery cache to be rebuilt.
\Drupal::service('library.discovery')->clearCachedDefinitions();
// Allow the module to perform install tasks.
$this->moduleHandler->invoke($module, 'install', [$sync_status]);