Bug #82181

Cannot override plugin view.templateRootPaths because of cache

Added by RVVN no-lastname-given over 1 year ago. Updated 9 months ago.

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

100%

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

Related to TYPO3 Core - Bug #82196: Can no longer configure diverging templateRootPaths for the view of each plugin in an extension Under Review 2017-08-24
Related to TYPO3 Core - Task #82487: Revert TemplatePaths optimizations and regressions Closed 2017-09-14

Associated revisions

Revision 30c46719 (diff)
Added by Claus Due over 1 year ago

[BUGFIX] Remove runtime cache and early return from TemplatePaths

This patch removes the previously introduced runtime cache
and early returns from TemplatePaths, both of which were
implemented in an attempt to prevent excessive TypoScript
parsing - an issue which has since been solved by optimising
the TypoScript parsing enough that a cache and early return
is no longer necessary (no longer constitutes a significant
performance increase).

The early return and caching introduced regressions described
in the related forge issues. Removing both solves those problems.

In addition, the method resolving TypoScript paths is now
covered by extensive unit tests confirming everything from
merging to sorting of template paths. An average of 8 tests
cover the method's lines. Each of the expected behaviors
is now declared as specific test.

Change-Id: Ia6d505dcec7d77ad7aaeea9094d7d85a58553c63
Resolves: #82196
Resolves: #82181
Related: #79662
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53917
Tested-by: TYPO3com <>
Reviewed-by: Jigal van Hemert <>
Tested-by: Jigal van Hemert <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

Revision 6e029278 (diff)
Added by Claus Due over 1 year ago

[BUGFIX] Remove runtime cache and early return from TemplatePaths

This patch removes the previously introduced runtime cache
and early returns from TemplatePaths, both of which were
implemented in an attempt to prevent excessive TypoScript
parsing - an issue which has since been solved by optimising
the TypoScript parsing enough that a cache and early return
is no longer necessary (no longer constitutes a significant
performance increase).

The early return and caching introduced regressions described
in the related forge issues. Removing both solves those problems.

In addition, the method resolving TypoScript paths is now
covered by extensive unit tests confirming everything from
merging to sorting of template paths. An average of 8 tests
cover the method's lines. Each of the expected behaviors
is now declared as specific test.

Change-Id: Ia6d505dcec7d77ad7aaeea9094d7d85a58553c63
Resolves: #82196
Resolves: #82181
Related: #79662
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53932
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Tested-by: TYPO3com <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

Revision 5b1dff4c (diff)
Added by Helmut Hummel about 1 year ago

[BUGFIX] Fix Fluid template path issues

Resolves: #82344
Resolves: #82181
Resolves: #73207
Related: #82407
Releases: master, 8.7
Change-Id: Icd0a8aa3f1646315c094ad8768e2ff0bb34033d9
Reviewed-on: https://review.typo3.org/53958
Tested-by: TYPO3com <>
Reviewed-by: Claus Due <>
Tested-by: Claus Due <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>

Revision 2074d366 (diff)
Added by Helmut Hummel about 1 year ago

[BUGFIX] Fix Fluid template path issues

Resolves: #82344
Resolves: #82181
Resolves: #73207
Related: #82407
Releases: master, 8.7
Change-Id: Icd0a8aa3f1646315c094ad8768e2ff0bb34033d9
Reviewed-on: https://review.typo3.org/54156
Tested-by: TYPO3com <>
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>

History

#1 Updated by RVVN no-lastname-given over 1 year ago

  • Related to Bug #82196: Can no longer configure diverging templateRootPaths for the view of each plugin in an extension added

#2 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53917

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53917

#4 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53917

#5 Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53917

#6 Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53917

#7 Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53932

#8 Updated by Anonymous over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#9 Updated by Benni Mack about 1 year ago

  • Related to Task #82487: Revert TemplatePaths optimizations and regressions added

#10 Updated by Claus Due about 1 year ago

  • Status changed from Resolved to Accepted

#11 Updated by Gerrit Code Review about 1 year ago

  • Status changed from Accepted to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#12 Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#13 Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#14 Updated by Gerrit Code Review about 1 year ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#15 Updated by Gerrit Code Review about 1 year ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#16 Updated by Gerrit Code Review about 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#17 Updated by Gerrit Code Review about 1 year ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#18 Updated by Gerrit Code Review about 1 year ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#19 Updated by Gerrit Code Review about 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53958

#20 Updated by Gerrit Code Review about 1 year ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#21 Updated by Gerrit Code Review about 1 year ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53958

#22 Updated by Gerrit Code Review about 1 year ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#23 Updated by Gerrit Code Review about 1 year ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53958

#24 Updated by Gerrit Code Review about 1 year ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53958

#25 Updated by Gerrit Code Review about 1 year ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#26 Updated by Gerrit Code Review about 1 year ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#27 Updated by Gerrit Code Review about 1 year ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53958

#28 Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54156

#29 Updated by Helmut Hummel about 1 year ago

  • Status changed from Under Review to Resolved

#30 Updated by Gerrit Code Review about 1 year ago

  • Status changed from Resolved to Under Review

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#31 Updated by Gerrit Code Review about 1 year ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#32 Updated by Gerrit Code Review about 1 year ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#33 Updated by Gerrit Code Review about 1 year ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#34 Updated by Gerrit Code Review about 1 year ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#35 Updated by Gerrit Code Review about 1 year ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#36 Updated by Gerrit Code Review about 1 year ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#37 Updated by Gerrit Code Review about 1 year ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#38 Updated by Gerrit Code Review about 1 year ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#39 Updated by Gerrit Code Review about 1 year ago

Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#40 Updated by Gerrit Code Review about 1 year ago

Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#41 Updated by Gerrit Code Review about 1 year ago

Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#42 Updated by Gerrit Code Review about 1 year ago

Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#43 Updated by Gerrit Code Review 10 months ago

Patch set 27 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#44 Updated by Gerrit Code Review 10 months ago

Patch set 28 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#45 Updated by Gerrit Code Review 10 months ago

Patch set 29 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#46 Updated by Gerrit Code Review 10 months ago

Patch set 30 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#47 Updated by Gerrit Code Review 10 months ago

Patch set 31 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#48 Updated by Gerrit Code Review 10 months ago

Patch set 32 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#49 Updated by Gerrit Code Review 10 months ago

Patch set 33 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#50 Updated by Gerrit Code Review 10 months ago

Patch set 34 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#51 Updated by Gerrit Code Review 10 months ago

Patch set 35 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#52 Updated by Gerrit Code Review 10 months ago

Patch set 36 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#53 Updated by Gerrit Code Review 10 months ago

Patch set 37 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#54 Updated by Gerrit Code Review 10 months ago

Patch set 38 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#55 Updated by Gerrit Code Review 10 months ago

Patch set 39 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#56 Updated by Gerrit Code Review 10 months ago

Patch set 40 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#57 Updated by Gerrit Code Review 10 months ago

Patch set 41 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#58 Updated by Gerrit Code Review 10 months ago

Patch set 42 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#59 Updated by Gerrit Code Review 10 months ago

Patch set 43 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#60 Updated by Gerrit Code Review 10 months ago

Patch set 44 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54140

#61 Updated by Riccardo De Contardi 9 months ago

  • Category set to Fluid

Also available in: Atom PDF