Skip to content
Snippets Groups Projects
Verified Commit 9dff9b18 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Fix wrong parameters to getLanguageOverlay

parent 2e4020a4
No related branches found
No related tags found
1 merge request!48[TASK] Require TYPO3 12
......@@ -151,7 +151,6 @@ class SitemapService {
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
$isLanguageVisibilityLoaded = ExtensionManagementUtility::isLoaded('languagevisibility');
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
$overlayType = $languageAspect->getLegacyOverlayType();
$frontendServices = GeneralUtility::makeInstance(FrontendServices::class);
foreach ($rows as $row) {
$table = 'tx_sgjobs_domain_model_job';
......@@ -174,7 +173,12 @@ class SitemapService {
if ($languageId > 0) {
/** @var LanguageAspect $languageAspect */
$row = $pageRepository->getLanguageOverlay($table, $row, $languageId, $overlayType);
$newLanguageAspect = new LanguageAspect(
$languageId,
$languageAspect->getContentId(),
$languageAspect->getOverlayType()
);
$row = $pageRepository->getLanguageOverlay($table, $row, $newLanguageAspect);
if (!is_array($row) || !count($row)) {
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment