Issue Bug Resolved

#108814Workspace preview ignores content element hidden state when page is hidden in LIVE

Amir Arends 01/30/26, 13:58 updated 11/11/26, 16:00

Description

When a page is hidden=1 in LIVE but hidden=0 in a workspace, content elements that are deliberately hidden in the workspace are still rendered visible in the workspace preview.

Root cause: PageRepository::checkIfPageIsHidden() (line ~2139) checks both the workspace version AND the live version:

$isHidden = !$accessVoter->accessGranted('pages', $versionedPage, $alternativeContext) || !$accessVoter->accessGranted('pages', $page, $alternativeContext);

Since the live page is hidden, $isHidden is always true. This propagates to PreviewSimulator which sets includeHiddenContent = true, disabling the HiddenRestriction for all content elements on that page.

Reviews 2

History 916

  1. Benni Mack commented <span data-processor="relativetime" data-value="2026-11-09T21:37:24+00:00" > 11/09/26, 21:37 </span>

    The root cause described here, PreviewSimulator enabling includeHiddenContent, no longer exists on main. It was removed by the revert in #108718 (40935ba54ec), so hidden content elements in a workspace are no longer forced visible through this path.

    One related problem remains in PageRepository::checkIfPageIsHidden(). A page that is hidden in live but visible in the workspace was still reported as hidden. The PreviewSimulator then enabled includeHiddenPages for the whole workspace preview, so other hidden pages appeared in menus and rootlines.

    Patch set 5 of https://review.typo3.org/c/Packages/TYPO3.CMS/+/92590 rebases the change onto main. It now looks only at the workspace version of the page, or at the live page if there is no workspace version. It also adds a functional test covering the live/workspace combinations, and no longer throws a TypeError for a missing page in a workspace.

    If you can still reproduce hidden content elements showing up in a workspace preview on current main, please add the steps here.

  2. Amir Arends commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-11T15:40:12+00:00" > 11/11/26, 15:40 </span>

    Applied in changeset commit:9e0b1af4ed55931513856954841702893bac4eea.

  3. Gerrit Code Review pushed patch set 2 for 14.3 to change 97549 status Resolved Under Review <span data-processor="relativetime" data-value="2026-11-11T15:46:22+00:00" > 11/11/26, 15:46 </span>

  4. Amir Arends commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-11-11T16:00:13+00:00" > 11/11/26, 16:00 </span>

    Applied in changeset commit:98a00ee7be205eec7e71c3fe7ae87797787da3a7.