Actions
Bug #81340
closedTemplatePaths::fillDefaultsByPackageName does not sort paths correctly
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-05-24
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The unfortunate series of events which lead to a problem:
- TemplatePaths->fillDefaultsByPackageName($extKey) gets called
- TemplatePaths->fillDefaultSByPackageName() calls getContextSpecificViewConfiguration()
- TemplatePaths->getContextSpecificViewConfiguration() reads TS and returns combined fallback paths and TS-configured paths
- TemplatePaths->fillFromConfigurationArray($resolvedPaths) gets called
- TemplatePaths->fillFromConfigurationArray() calls TemplatePaths->extractPathArrays()
- TemplatePaths->extractPathArrays() calls array_values
Result: when calling fillDefaultsByPackageName() TS paths do not get sorted correctly even though the right setTemplateRootPaths and so on get called. Normally these methods would indeed sort the paths correctly, but the array_values() part (Fluid standalone cares about order, not keys) causes the methods that do perform sorting, to receive an "already sorted" (=values only, numeric zero-index in order TS was declared) which of course does not get sorted further. Final result is that template overrides do not work if View was initialised with this method - which by the way should be the preferred way to initialise View template paths everywhere in TYPO3.
Actions