From 85972fddfcf533a7b7742a1e73e9044271867ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Thu, 2 May 2024 19:15:40 +0200 Subject: [PATCH] fix: avoid undefined array key "addRootLineFields" in TYPO3 v13.2 --- CHANGELOG.md | 3 +++ Documentation/Changelog/Index.rst | 6 ++++++ ext_localconf.php | 7 ++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e7421a7..11668edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Undefined array key "addRootLineFields" in TYPO3 v13.2 + ## [3.4.0] - 2024-02-16 ### Updated diff --git a/Documentation/Changelog/Index.rst b/Documentation/Changelog/Index.rst index 48f7b8e4..2db91283 100644 --- a/Documentation/Changelog/Index.rst +++ b/Documentation/Changelog/Index.rst @@ -11,6 +11,12 @@ to `Semantic Versioning `_. `Unreleased `_ ------------------------------------------------------------------------------ +Fixed +^^^^^ + + +* Undefined array key "addRootLineFields" in TYPO3 v13.2 + `3.4.0 `_ - 2024-02-16 ---------------------------------------------------------------------------------------- diff --git a/ext_localconf.php b/ext_localconf.php index 03e8a6e4..28b3d38f 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -9,7 +9,12 @@ defined('TYPO3') || die(); -$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ',nav_hide,tx_schema_webpagetype'; +if (isset($GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'])) { + // Since TYPO3 v13.2 the addRootLineFields are not necessary anymore + // This configuration can be removed once compatibility with TYPO3 v12 is gone + // @see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.2/Deprecation-103752-ObsoleteGLOBALSTYPO3_CONF_VARSFEaddRootLineFields.html + $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ',nav_hide,tx_schema_webpagetype'; +} $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess'][] = SchemaMarkupInjection::class . '->execute';