Skip to content

Commit

Permalink
[BUGFIX] Show hidden inline child elements in backend preview
Browse files Browse the repository at this point in the history
Fixes: #620
Related: #468
(cherry picked from commit 0c6fa54)
  • Loading branch information
nhovratov committed Feb 29, 2024
1 parent e03a525 commit e3ad224
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/Helper/InlineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit e3ad224

Please sign in to comment.