Skip to content

Commit

Permalink
[BUGFIX] Ensure TSconfig order is identical in BE and FE
Browse files Browse the repository at this point in the history
Make sure the inclusion order of TSconfig (files and record field)
are identical in BE and FE. As BE and FE use different algorithms,
FE is adjusted to match the BE behaviour, which is the expected one.

Resolves: #84227
Releases: master, 8.7
Change-Id: Idb4afbd736ed65890850ee75d572a55c3a5ab24d
Reviewed-on: https://review.typo3.org/56122
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
  • Loading branch information
liayn authored and susannemoog committed Mar 13, 2018
1 parent 0162ff1 commit 5c834a1
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -3964,10 +3964,14 @@ public function getPagesTSconfig()
if (!is_array($this->pagesTSconfig)) {
$TSdataArray = [];
foreach ($this->rootLine as $k => $v) {
// add TSconfig first, as $TSdataArray is reversed below and it shall be included last
$TSdataArray[] = $v['TSconfig'];
if (trim($v['tsconfig_includes'])) {
$includeTsConfigFileList = GeneralUtility::trimExplode(',', $v['tsconfig_includes'], true);
// reverse the includes first to make sure their order is preserved when $TSdataArray is reversed
$includeTsConfigFileList = array_reverse($includeTsConfigFileList);
// Traversing list
foreach ($includeTsConfigFileList as $key => $includeTsConfigFile) {
foreach ($includeTsConfigFileList as $includeTsConfigFile) {
if (strpos($includeTsConfigFile, 'EXT:') === 0) {
list($includeTsConfigFileExtensionKey, $includeTsConfigFilename) = explode(
'/',
Expand All @@ -3987,7 +3991,6 @@ public function getPagesTSconfig()
}
}
}
$TSdataArray[] = $v['TSconfig'];
}
// Adding the default configuration:
$TSdataArray[] = $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'];
Expand Down

0 comments on commit 5c834a1

Please sign in to comment.