From ef695e4f1ad5d25383ecff0508be401f80e3bb09 Mon Sep 17 00:00:00 2001 From: Frank Naegler Date: Mon, 1 Jun 2020 20:02:20 +0200 Subject: [PATCH] [BUGFIX] Show hidden records that are unhidden in workspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a live record that is hidden, but gets unhidden in a workspace version, the record should also be resolved within move placeholder resolving. Resolves: #88054 Releases: master, 10.4, 9.5 Change-Id: Ia5396c6d0cc6b6a915ac8af21008ff5c592c1fe1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64630 Tested-by: TYPO3com Tested-by: Frank Nägler Tested-by: Danilo Caccialanza Tested-by: Benni Mack Reviewed-by: Frank Nägler Reviewed-by: Danilo Caccialanza Reviewed-by: Benni Mack --- typo3/sysext/frontend/Classes/Page/PageRepository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/typo3/sysext/frontend/Classes/Page/PageRepository.php b/typo3/sysext/frontend/Classes/Page/PageRepository.php index 9b57b8833c5c..e80f44c5607c 100644 --- a/typo3/sysext/frontend/Classes/Page/PageRepository.php +++ b/typo3/sysext/frontend/Classes/Page/PageRepository.php @@ -31,6 +31,7 @@ use TYPO3\CMS\Core\Database\Query\Restriction\FrontendGroupRestriction; use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer; use TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction; +use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction; use TYPO3\CMS\Core\Error\Http\ShortcutTargetPageNotFoundException; use TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException; use TYPO3\CMS\Core\Resource\FileRepository; @@ -1942,6 +1943,7 @@ protected function movePlhOL($table, &$row) if ($moveID) { $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table); $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class, $this->context)); + $queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class); $origRow = $queryBuilder->select(...array_keys($this->purgeComputedProperties($row))) ->from($table) ->where(