Issue Bug Rejected

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

Rasmus Larsen 03/21/18, 14:47 updated 03/11/20, 22:23

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.