#82181Cannot override plugin view.templateRootPaths because of cache
Description
HI,
I put 2 plugins on a page using TypoScript USER_INT objects like this :
page.555 = USER_INT
page.555 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Rvvnplugintest
pluginName = Pi1
controller = Test
vendorName = RVVN
view.templateRootPaths.10 = EXT:rvvnplugintest/Resources/Private/Templates2/
}
page.556 = USER_INT
page.556 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Rvvnplugintest
pluginName = Pi1
controller = Test
vendorName = RVVN
view.templateRootPaths.10 = EXT:rvvnplugintest/Resources/Private/Templates3/
}
The problem is that second plugin instance is not using its configured templates folder (ie “Templates3”) but the one configured for the first plugin instance (ie “Templates2”).
After inspection, I found that the function getContextSpecificViewConfiguration in TemplatePaths class looks for plugin configuration in cache then returns it, if found.
Thus, other instances of the same plugin cannot override templates and always use the first ones from the cache.
Reviews 5
- main 54140[BUGFIX] Consolidate Fluid template path configuration
- main 53958[BUGFIX] Fix Fluid template path issues
- TYPO3_8-7 54156[BUGFIX] Fix Fluid template path issues
- TYPO3_8-7 53932[BUGFIX] Remove runtime cache and early return from TemplatePaths
- main 53917[BUGFIX] Remove runtime cache and early return from TemplatePaths