Bug #84512

styles.templates.*RootPath variable results should be ignored when empty

Added by Rasmus Larsen over 1 year ago. Updated 5 months ago.

Status:
New
Priority:
Should have
Assignee:
Category:
Fluid Styled Content
Start date:
2018-03-21
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the fluid_styled_content builtin extension a variable $styles.templates.templateRootPath/$styles.templates.partialRootPath/$styles.templates.layoutRootPath exists that can be used to override templates. (in fluid_styled_content/Configuration/TypoScript/Helper/ContentElement.txt)

Unfortunately I've found that if undefined/empty, this variable will be used anyway, resulting in an empty entry in the paths:
array(2) { [0]=> string(114) "/mnt/web-data/sites/konto-experimental.systime.dk/web/typo3/sysext/fluid_styled_content/Resources/Private/Layouts/" [10]=> string(0) "" }

This doesn't make anything break as such, but atleast in the case of partialRootPaths the 10 entry is evaluated first in typo3fluids resolveFileInPaths function, which causes two useless is_file requests to be made to:
"Default.html"
"Default"

In environments with slow stat calls (network file systems and the like) this can take a ms or more, and it just generally doesn't seem like the behavior one would want.

I believe the variable should be checked and, if empty, should not be used.

History

#1 Updated by Rasmus Larsen over 1 year ago

  • Assignee changed from Claus Due to Benjamin Kott

#2 Updated by Benni Mack 5 months ago

  • Target version changed from next-patchlevel to Candidate for patchlevel

Also available in: Atom PDF