Project

General

Profile

Actions

Bug #79662

open

Fluid caches default view paths

Added by Claus Due about 7 years ago. Updated over 4 years 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 1 (0 open1 closed)

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

Actions
Actions

Also available in: Atom PDF