Bug #79662

Fluid caches default view paths

Added by Claus Due over 4 years ago. Updated over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
Category:
Fluid
Target version:
-
Start date:
2017-02-07
Due date:
% Done:

100%

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

Description

The issue can be reproduced as follows:

1) configure (and optionally register) a normal Extbase plugin to call a controller action
2) define this plugin as USER function (normal TS to render Extbase) on the PAGE TS object (any typeNum)
3) define multiple view paths for the extension containing the plugin
4) Install Flux and register a template as CType

Result:

Fluid is asked to return view paths for a the extension name at two different execution points - first, during bootstrapping (before TS is available) and then again after bootstrapping is done (when TS is available). Because Fluid uses the runtime cache to store retrieved template paths, the first fallbacks-only set of paths is cached and returned for the second request after TS is available.

End result is that Fluid ignores the TS paths.

Note:

Although this currently requires Flux to expose, the bug is not in Flux itself and cannot be properly prevented there. It is also possible to reproduce this problem by subscribing to a hook in TSFE which gets called before TS is parsed, and have this hook subscriber render a template from an extension which also contains a plugin that will be rendered as page content or via USER TS object. The first rendering will then cause the paths to be cached and subsequent renderings will not detect any TS path settings.

Solution:

The problem can be fixed by not allowing CMS Fluid's TemplatePaths to be stored in runtime cache when the paths are purely fallbacks. By caching only when the "configured paths" (read: specified using setters or defined in TS) we circumvent the problem.


Related issues

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

Actions
#1

Updated by Gerrit Code Review over 4 years 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/51564

#2

Updated by Gerrit Code Review over 4 years 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/51564

#3

Updated by Anonymous over 4 years ago

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

Updated by Gerrit Code Review almost 4 years ago

  • Status changed from Resolved 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

#5

Updated by Gerrit Code Review almost 4 years 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

#6

Updated by Markus Klein almost 4 years ago

  • Status changed from Under Review to Resolved
#7

Updated by Benni Mack almost 4 years ago

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

Updated by Claus Due almost 4 years ago

  • Status changed from Resolved to Accepted
#9

Updated by Gerrit Code Review almost 4 years 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

#10

Updated by Gerrit Code Review almost 4 years 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

#11

Updated by Gerrit Code Review almost 4 years 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

#12

Updated by Gerrit Code Review over 3 years 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

#13

Updated by Gerrit Code Review over 3 years 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

#14

Updated by Gerrit Code Review over 3 years 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

#15

Updated by Gerrit Code Review over 3 years 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

#16

Updated by Gerrit Code Review over 3 years 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

#17

Updated by Helmut Hummel over 3 years ago

  • Status changed from Under Review to Needs Feedback

Not sure if the regression fix patch also solves this one here. I would appreciate to have code that demonstrates bug and fix

#18

Updated by Gerrit Code Review over 3 years ago

  • Status changed from Needs Feedback to Under Review

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

#19

Updated by Gerrit Code Review over 3 years 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

#20

Updated by Gerrit Code Review over 3 years 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

#21

Updated by Gerrit Code Review over 3 years 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

#22

Updated by Gerrit Code Review over 3 years ago

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

#23

Updated by Gerrit Code Review over 3 years 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

#24

Updated by Gerrit Code Review over 3 years 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

#25

Updated by Gerrit Code Review over 3 years 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

#26

Updated by Gerrit Code Review over 3 years 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

#27

Updated by Gerrit Code Review over 3 years 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

#28

Updated by Gerrit Code Review over 3 years 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

#29

Updated by Gerrit Code Review over 3 years 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

#30

Updated by Gerrit Code Review over 3 years 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

#31

Updated by Gerrit Code Review over 3 years 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

#32

Updated by Gerrit Code Review over 3 years 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

#33

Updated by Gerrit Code Review over 3 years 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

#34

Updated by Gerrit Code Review over 3 years 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

#35

Updated by Susanne Moog over 3 years ago

  • Category set to Fluid
#36

Updated by Gerrit Code Review over 3 years 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

#37

Updated by Gerrit Code Review over 3 years 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

#38

Updated by Gerrit Code Review over 3 years 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

#39

Updated by Gerrit Code Review over 3 years 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

#40

Updated by Gerrit Code Review over 3 years 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

#41

Updated by Gerrit Code Review over 3 years 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

#42

Updated by Gerrit Code Review over 3 years 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

#43

Updated by Gerrit Code Review over 3 years 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

#44

Updated by Gerrit Code Review over 3 years 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

#45

Updated by Gerrit Code Review over 3 years 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

#46

Updated by Gerrit Code Review over 3 years 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

#47

Updated by Gerrit Code Review over 3 years 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

#48

Updated by Gerrit Code Review over 3 years 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

#49

Updated by Gerrit Code Review over 3 years 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

#50

Updated by Gerrit Code Review over 3 years 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

#51

Updated by Gerrit Code Review over 3 years 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

#52

Updated by Gerrit Code Review over 3 years 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

#53

Updated by Gerrit Code Review over 3 years 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

#54

Updated by Susanne Moog over 2 years ago

  • Status changed from Under Review to Needs Feedback
  • Assignee set to Claus Due

Path has been abandoned. @Claus: Can you check if we still need this concrete issue or whether your potentially different solution renders this one obsolete?

#55

Updated by Riccardo De Contardi over 1 year ago

  • Status changed from Needs Feedback to New

Asked Claus - still present.

1- It's still relevant for people who have trouble with default template paths being cached

2- There are a handful of other issues that relate to it (trouble with template paths and context)

3- When we finally switch to Fluid 3.0 the template paths and view become deprecated, at which time TYPO3 is likely to adopt a different API than "TemplatePaths" class (and when it does I will be watchful and not allow it to cache path settings because the rest of Fluid isn't cached anymore)

Also available in: Atom PDF