Project

General

Profile

Actions

Bug #81340

closed

TemplatePaths::fillDefaultsByPackageName does not sort paths correctly

Added by Claus Due about 7 years ago. Updated almost 6 years ago.

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.


Related issues 1 (0 open1 closed)

Precedes TYPO3 Core - Bug #81677: TYPO3 Exception "Section "main" does not exist." under TYPO3 8.7.2 Closed2017-06-22

Actions
Actions

Also available in: Atom PDF