Project

General

Profile

Actions

Bug #82181

closed

Cannot override plugin view.templateRootPaths because of cache

Added by RVVN no-lastname-given over 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-08-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #82196: Can no longer configure diverging templateRootPaths for the view of each plugin in an extensionClosed2017-08-24

Actions
Related to TYPO3 Core - Task #82487: Revert TemplatePaths optimizations and regressionsClosedBenni Mack2017-09-14

Actions
Actions

Also available in: Atom PDF