Issue Bug Closed

#94718Fallback for "default" page TSconfig has to be a string

Oliver Bartsch 08/05/21, 10:38 updated 09/07/21, 07:32

Description

The value of a TSconfig entry in the TSconfig array of ModifyLoadedPageTsConfigEvent is the TSconfig string.

Therefore it should be possible to extend e.g. the default TSconfig (read from $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig']) in this way:

$tsConfig = $event->getTsConfig();
$tsConfig['default'] .= 'my.custom.config';
$event->setTsConfig($tsConfig);

This however may fail due to the fallback, set in PageTsConfigLoader->collect:

$tsData = [
    'default' => $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'] ?? []
];

Reviews 2