Bug #99213
closedFrontendConfigurationManager - Undefined array key "recursive"
100%
Description
I get the following error.
Undefined array key "recursive" in /var/www/typo3_src-11.5.19/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php line 129
Maybe this is the solution.
Original code: https://github.com/TYPO3/typo3/blob/v11.5.19/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php#L124
Bring the line $this->contentObject->data['recursive'] to the top under $pages und return a default value if not exists.
protected function overrideStoragePidIfStartingPointIsSet(array $frameworkConfiguration): array
{
$pages = $this->contentObject->data['pages'] ?? '';
$recursive = $this->contentObject->data['recursive'] ?? '';
if (is_string($pages) && $pages !== '') {
$list = [];
if ($recursive > 0) {
$explodedPages = GeneralUtility::trimExplode(',', $pages);
foreach ($explodedPages as $pid) {
$pids = $this->contentObject->getTreeList($pid, $this->contentObject->data['recursive']);
if ($pids !== '') {
$list[] = $pids;
}
}
}
if (!empty($list)) {
$pages = $pages . ',' . implode(',', $list);
}
ArrayUtility::mergeRecursiveWithOverrule($frameworkConfiguration, [
'persistence' => [
'storagePid' => $pages,
],
]);
}
return $frameworkConfiguration;
}
Updated by Gerrit Code Review almost 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77371
Updated by Gerrit Code Review almost 2 years ago
Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77371
Updated by Georg Ringer almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 008068ba8dffc6c1a17b58bc0e6fa46af4cafbdc.