[BUGFIX] Add workspace overlay for translated page title 84/54584/3
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 7 Nov 2017 19:40:29 +0000 (20:40 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 8 Nov 2017 07:29:13 +0000 (08:29 +0100)
The title of a translated page must be overlayed with the
workspace version.

Resolves: #65607
Releases: master, 8.7, 7.6
Change-Id: If10260f196776a16a53968b78542827ecbc145fe
Reviewed-on: https://review.typo3.org/54584
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Controller/PageLayoutController.php

index f8a8c9c..086c100 100644 (file)
@@ -704,7 +704,7 @@ class PageLayoutController
                 ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
                 ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
             $overlayRecord = $queryBuilder
-                ->select('title')
+                ->select('*')
                 ->from('pages_language_overlay')
                 ->where(
                     $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)),
@@ -716,6 +716,7 @@ class PageLayoutController
                 ->setMaxResults(1)
                 ->execute()
                 ->fetch();
+            BackendUtility::workspaceOL('pages_language_overlay', $overlayRecord);
             return $overlayRecord['title'];
         }
         return $this->pageinfo['title'];