Skip to content

Commit

Permalink
[BUGFIX] Use _LOCALIZED_UID also for pages in Extbase persistence
Browse files Browse the repository at this point in the history
When pages use overlays, the special key "_PAGES_OVERLAY_UID"
is used (PageRepository->getPageOverlay), for other
pages doing overlays, the property "_LOCALIZED_UID" is used
(PageRepository->getRecordOverlay).

Extbase is setting the special property $_localizedUid in
a Domain Model, based on the key "_LOCALIZED_UID" in the
DataMapper. The Typo3DbBackend now maps the _PAGES_OVERLAY_UID
onto the _LOCALIZED_UID in order to have Extbase deal with
language overlays in pages as well.

Resolves: #88951
Releases: main, 12.4
Change-Id: If0b462d0373cf63fcdb78b75cc0f3381c85eee8d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82147
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
  • Loading branch information
bmack committed Dec 8, 2023
1 parent 9231121 commit 9fb117d
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -511,6 +511,11 @@ protected function overlayLanguageAndWorkspaceForSingleRecord(string $tableName,
if (is_array($row) && $fetchLocalizedRecord) {
if ($tableName === 'pages') {
$row = $pageRepository->getLanguageOverlay($tableName, $row);
// DataMapper only checks for _LOCALIZED_UID when setting '_localizedUid' property
// and not _PAGES_OVERLAY_UID.
if (isset($row['_PAGES_OVERLAY_UID'])) {
$row['_LOCALIZED_UID'] = $row['_PAGES_OVERLAY_UID'];
}
} else {
if (!$querySettings->getRespectSysLanguage()
&& $languageOfCurrentRecord > 0
Expand Down

0 comments on commit 9fb117d

Please sign in to comment.