Bug #82196
closedCan no longer configure diverging templateRootPaths for the view of each plugin in an extension
100%
Description
Up until including TYPO3 7.6 it was possible to configure different templateRootPaths for the views of each plugin within an extension.
For example, with the following configuration ...
plugin.tx_extensionName { view { templateRootPaths { 0 = EXT:extensionName/Resources/Private/Templates/ } partialRootPaths { 0 = EXT:extensionName/Resources/Private/Partials/ } layoutRootPaths { 0 = EXT:extensionName/Resources/Private/Layouts/ } } } plugin.tx_extensionName_pluginName { view { templateRootPaths { 0 = EXT:extensionName/Resources/Private/Templates/ 1 = EXT:extensionName/Resources/Private/PluginName/Templates/ } partialRootPaths { 0 = EXT:extensionName/Resources/Private/PluginName/ 1 = EXT:extensionName/Resources/Private/PluginName/Partials/ } layoutRootPaths { 0 = EXT:extensionName/Resources/Private/Layouts/ 1 = EXT:extensionName/Resources/Private/PluginName/Layouts/ } } }
... you would get the plugin "PluginName" to use their own template path and fall back to the templates/partials in the default partial root path.
This is no longer possible due to a change in \TYPO3\CMS\Fluid\View\AbstractTemplateView:
Before this line, the templateRootPaths are configured correctly. When the templateRootPaths are reinitialized by \TYPO3Fluid\Fluid\View\TemplatePaths::fillDefaultsByPackageName, the configuration within plugin.tx_extensionName.view is used without taking plugin.tx_extensionName_pluginName into account.
Granted, this is a rather special use case, but it was helpful if you were required to change only some of the templates or partials in a plugin and wanted to reuse most of the resources of another plugin. Also, the old behaviour was much more consistent with the overall Typoscript configuration of extbase plugins where you can also, for example, configure different storagePids for each plugin.
I couldn't find a breaking change remark in the changelog so I don't think this is intended?
regards
Thomas