Skip to content
Snippets Groups Projects
Commit 2464bbe0 authored by Claus Due's avatar Claus Due Committed by Nicole Cordes
Browse files

[BUGFIX] Do not cache fallback View paths

This patch fixes an issue with TemplatePaths, where paths
for a given extension key get used at two execution points:

* Before TS becomes available
* At any time after TS becomes available

In this case, TemplatePaths holds on to the fallback paths
which the first rendering detects (since TS is not availble,
fallback paths get returned) and all subsequent rendering
of any template in that extension context, yields only the
fallback paths and ignores what is defined in TS.

By not allowing fallback paths to be cached in runtime, the
problem is prevented.

Change-Id: Idd0216f67f9a7f875a4509b34c9a32f66208db93
Resolves: #79662
Releases: master
Reviewed-on: https://review.typo3.org/51564


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarThomas Hohn <thomas@hohn.dk>
Reviewed-by: default avatarMorten Pless <mpl@systime.dk>
Tested-by: default avatarMorten Pless <mpl@systime.dk>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarClaus Due <claus@phpmind.net>
Tested-by: default avatarClaus Due <claus@phpmind.net>
Reviewed-by: default avatarNicole Cordes <typo3@cordes.co>
Tested-by: default avatarNicole Cordes <typo3@cordes.co>
parent 9215c1cd
Branches
Tags
No related merge requests found
......@@ -115,6 +115,10 @@ class TemplatePaths extends \TYPO3Fluid\Fluid\View\TemplatePaths
}
}
if (empty($configuredPaths)) {
return $paths;
}
foreach ($paths as $name => $defaultPaths) {
if (!empty($configuredPaths[$name])) {
$paths[$name] = $defaultPaths + (array)$configuredPaths[$name];
......@@ -122,6 +126,7 @@ class TemplatePaths extends \TYPO3Fluid\Fluid\View\TemplatePaths
}
$cache->set($cacheIdentifier, $paths);
return $paths;
}
......
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