From e3ad224feeed269c69eece2b0ba3941b22b12917 Mon Sep 17 00:00:00 2001 From: Nikita Hovratov Date: Thu, 29 Feb 2024 12:22:46 +0100 Subject: [PATCH] [BUGFIX] Show hidden inline child elements in backend preview Fixes: #620 Related: #468 (cherry picked from commit 0c6fa547a31d2f10168627a8e6f66e3c3dc50ee1) --- Classes/Helper/InlineHelper.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/Helper/InlineHelper.php b/Classes/Helper/InlineHelper.php index 2e4e4d14..aaf0f132 100644 --- a/Classes/Helper/InlineHelper.php +++ b/Classes/Helper/InlineHelper.php @@ -26,6 +26,7 @@ use TYPO3\CMS\Core\Context\Context; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Database\Query\Restriction\FrontendGroupRestriction; +use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction; use TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction; use TYPO3\CMS\Core\Database\RelationHandler; use TYPO3\CMS\Core\Domain\Repository\PageRepository; @@ -271,6 +272,10 @@ public function getInlineElements( // Remove default restrictions for workspace preview in order to fetch the original record uids. if ($inWorkspacePreviewMode) { $queryBuilder->getRestrictions()->removeAll(); + } elseif ($isFrontendRequest === false) { + // In backend context we want to display hidden records. + $restrictions = $queryBuilder->getRestrictions(); + $restrictions->removeByType(HiddenRestriction::class); } if (BackendUtility::isTableWorkspaceEnabled($childTable)) {