Skip to content

Commit

Permalink
[BUGFIX] Migrate getRecordOverlay to getLanguageOverlay in SimplePrev…
Browse files Browse the repository at this point in the history
…NextViewHelper (#2596) (#2611)

When using the ViewHelper on a non-default language page it tries to
invoke a now recently protected function.
Call to protected method TYPO3\CMS\Core\Domain\Repository\PageRepository::getRecordOverlay() from scope GeorgRinger\News\ViewHelpers\SimplePrevNextViewHelper
Migration according to TYPO3 Changelog Breaking: #98303

Resolves: #2596
  • Loading branch information
fgruber1306 authored Feb 15, 2025
1 parent 43a692a commit 976fe59
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Classes/ViewHelpers/SimplePrevNextViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,10 @@ protected function getObject($id)

if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE']) && $languageAspect->getContentId() > 0) {
// @extensionScannerIgnoreLine
$overlay = $GLOBALS['TSFE']->sys_page->getRecordOverlay(
$overlay = $GLOBALS['TSFE']->sys_page->getLanguageOverlay(
'tx_news_domain_model_news',
$rawRecord,
$languageAspect->getContentId(),
$languageAspect->getLegacyOverlayType()
$languageAspect
);
if (!is_null($overlay)) {
$rawRecord = $overlay;
Expand Down

0 comments on commit 976fe59

Please sign in to comment.