diff --git a/typo3/sysext/core/Classes/Utility/RootlineUtility.php b/typo3/sysext/core/Classes/Utility/RootlineUtility.php index 52dc33ce1d2b..20d55c1bea0a 100644 --- a/typo3/sysext/core/Classes/Utility/RootlineUtility.php +++ b/typo3/sysext/core/Classes/Utility/RootlineUtility.php @@ -284,7 +284,8 @@ protected function enrichWithRelationFields($uid, array $pageRecord) // @todo Remove this special interpretation of relations by consequently using RelationHandler foreach ($GLOBALS['TCA']['pages']['columns'] as $column => $configuration) { - if ($this->columnHasRelationToResolve($configuration)) { + // Ensure that only fields defined in $rootlineFields (and "addRootLineFields") are actually evaluated + if (array_key_exists($column, $pageRecord) && $this->columnHasRelationToResolve($configuration)) { $configuration = $configuration['config']; if ($configuration['MM']) { /** @var $loadDBGroup \TYPO3\CMS\Core\Database\RelationHandler */ diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-84144-RootlineUtilityIsEnrichingOnlyProperlySelectedRelationalDatabaseFields.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-84144-RootlineUtilityIsEnrichingOnlyProperlySelectedRelationalDatabaseFields.rst new file mode 100644 index 000000000000..55daecf72a5b --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Important-84144-RootlineUtilityIsEnrichingOnlyProperlySelectedRelationalDatabaseFields.rst @@ -0,0 +1,20 @@ +.. include:: ../../Includes.txt + +================================================================================================== +Important: #84144 - RootlineUtility is enriching only properly selected relational database fields +================================================================================================== + +See :issue:`84144` + +Description +=========== + +The main functionality for fetching the whole rootline of a page previously fetched all relational +fields defined in TCA of a page record. This led to massive performance problems with large menus, +as not all fields are necessary in root line records. + +Now, the rootline fetching only looks up relational data of fields which have been added to +:php:`$GLOBALS[TYPO3_CONF_VARS][FE][addRootLineFields]`. The field `pages.media` is added per +default since it is a predefined value. + +.. index:: Frontend, ext:frontend