Commit 302cd4e3 authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[BUGFIX] Fix cached importmap dependency resolution

The importmap dependencies were not correctly resolved
as the importmap has not been stored into $this->importMaps
when loaded from the assets cache.

Do properly store the value into $this->importMaps
in getFromCache and actually always use getImportMaps()
wrapper to avoid using the importMaps property that is
null by default.

This fixed for example the RTE external url link browser
that missed the configuration for the EXT:backend importmap.

Releases: main
Resolves: #96933
Related: #96510
Change-Id: Ib9305b9275ebde039230646ac4199c81ee8fcf85
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73567

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
parent cb513361
......@@ -163,7 +163,8 @@ class ImportMap
if (!$this->cache->has($this->cacheIdentifier)) {
return null;
}
return $this->cache->get($this->cacheIdentifier);
$this->importMaps = $this->cache->get($this->cacheIdentifier);
return $this->importMaps;
}
protected function computeImportMaps(): array
......@@ -286,7 +287,7 @@ class ImportMap
}
$this->extensionsToLoad[$packageName] = true;
$dependencies = $this->importMaps[$packageName]['dependencies'] ?? [];
$dependencies = $this->getImportMaps()[$packageName]['dependencies'] ?? [];
foreach ($dependencies as $dependency) {
$this->loadDependency($dependency);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment