Bug #82196
Updated by Thomas Prangenberg almost 7 years ago
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 ... <pre> 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 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/ EXT:extensionName/Resources/Private/PluginFoo/Partials/ } layoutRootPaths { 0 = EXT:extensionName/Resources/Private/Layouts/ 1 = EXT:extensionName/Resources/Private/PluginName/Layouts/ } } } </pre> ... 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: https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php#L79 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