Skip to content

Commit

Permalink
fix: avoid undefined array key "addRootLineFields" in TYPO3 v13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
brotkrueml committed May 2, 2024
1 parent 6d5672c commit 85972fd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Documentation/Changelog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
`Unreleased <https://github.com/brotkrueml/schema/compare/v3.4.0...HEAD>`_
------------------------------------------------------------------------------

Fixed
^^^^^


* Undefined array key "addRootLineFields" in TYPO3 v13.2

`3.4.0 <https://github.com/brotkrueml/schema/compare/v3.3.0...v3.4.0>`_ - 2024-02-16
----------------------------------------------------------------------------------------

Expand Down
7 changes: 6 additions & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 85972fd

Please sign in to comment.