Bug #104365
openpage.tsconfig vs. ExtensionManagementUtility::addPageTSConfig
0%
Description
Starting with TYPO3 12 it is possible to add a file page.tsconfig
in my_ext/Configuration
(see https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/UsingSetting/PageTSconfig.html#pagesettingdefaultpagetsconfig).
To be compatible with TYPO3 11.5, one can add ExtensionManagementUtility::addPageTSConfig()
in ext_localconf.php
.
I am interpreting the docs in the way, that both ways can be used equally. As I don't have to be compatible with 11.5 I opted to use page.tsconfig
.
BUT:
When using ExtensionManagementUtility::addPageTSConfig()
the resulting TSConfig is other than when using page.tsconfig
. Namely I want to override the backend layouts provided by the extension bootstrap_package. I am trying to unset all but one layout and change the config of that layout.
When using ExtensionManagementUtility::addPageTSConfig()
the unsetting and overriding works as expected, when using page.tsconfig
the unsetting and overriding is not working at all but new properties are merged into the config.
Entry file:
[1 in tree.rootLineParentIds] @import 'EXT:sitepackage/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts.tsconfig' # remove unused backend layouts mod { web_layout { BackendLayouts { 2_columns > 2_columns_25_75 > 2_columns_50_50 > 2_columns_offset_right > 3_columns > simple > special_feature > special_start > subnavigation_left > subnavigation_left_2_columns > subnavigation_right > subnavigation_right_2_columns > } } } [END]
Backend layout config: (BackendLayouts.tsconfig)
################################ #### BACKENDLAYOUT: DEFAULT #### ################################ mod { SHARED.colPos_list = ... web_layout { BackendLayouts { default { title = LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:backend_layout.default config { backend_layout { rowCount = 6 rows { ... 3 { columns { 1 { name = LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:backend_layout.column.normal colPos = 0 colspan = 12 } } } ... 6 { columns { 1 { name = LLL:EXT:sitepackage/Resources/Private/Language/backend.xlf:backend_layout.column.footerafter colPos = 13 colspan = 12 } } } } } } icon = EXT:bootstrap_package/Resources/Public/Icons/BackendLayouts/default.svg } } } }
Result with page.tsconfig
- backend layouts are NOT removed (e. g. 2_columns >)
- mod.SHARED.colPos_list is added
- rows.6 is added
- config.backend_layout.rowCount is '5' in bootstrap_package, but gets NOT overridden with '6' as intended
- changed name of 3.columns.1.name for testing, but is not overriden either
Result with ExtensionManagementUtility::addPageTSConfig()
- backend layouts are removed (e. g. 2_columns >)
- mod.SHARED.colPos_list is added
- rows.6 is added
- config.backend_layout.rowCount gets overridden with '6'
- name of 3.columns.1.name gets overridden
Question: Is there a difference between the processing of page.tsconfig and ExtensionManagementUtility::addPageTSConfig()?