Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Reinitialize ContentObjectRenderer for pages
The menu generation must not reuse the page record from the current page but must use the data from the linked page. Resolves: #101883 Releases: main, 12.4 Change-Id: I491ed6d2f0d33f9bbe2ef934c4304adfae656808 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83654 Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Oliver Hader <oliver.hader@typo3.org> Tested-by: Benni Mack <benni@typo3.org>
- Loading branch information
6578a96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem. If the $link = $this->parent_cObj->createLink('|', $conf); trows an error the original data is newer restored, because the code doesn't reaches the '$this->parent_cObj->data = $backupData;'
you should change it to e.g.
try{
$link = $this->parent_cObj->createLink('|', $conf);
} catch(.......) {
$link = null;
}
We have this problem on Project where one page is a shortcut and the page where the shortcut shows is not translated In that case $this->parent_cObj->data ends with the datas from the shortcut page.