Issue Bug Closed

#106336403 Page Not Found when previewing not hidden page of hidden parent, both with extendToSubpages=1

Sybille Peters 03/07/25, 15:47 updated 12/02/25, 14:22

Description

I thought #87392 was resolved but now found reproducible test case where bug still reappears, however in a more narrow scenario:

The difference is that the not hidden subpage also has extendToSubpages=1.

Reproduce

page test: hidden=1, extendToSubpages=1
   |
   -> page test2: hidden=0, extendToSubpages=1
  1. create a page “test”, set it as hidden=1; extendToSubpages=1
  2. create a subpage “test2” of “test”, set it as visible (hidden=0) and extendToSubpages=1
  3. We are logged in the Backend, on the pagetree, click on “test2” > preview
  • Expected result: We expect page to be rendered with a “Preview” in top right
  • Actual result: 403:

> 403
> Page Not Found
> The page did not exist or was inaccessible. Reason: Subsection was found and not accessible
> Request: 21197dc0bb977

Versions

reproduced with

  • latest main (14.0.0-dev)
  • latest 13.4 branch (13.4.6-dev)
  • latest 12.4 branch (12.4.28-dev)

Reviews 3

History 1321

  1. Sybille Peters commented <span data-processor="relativetime" data-value="2025-03-07T16:58:53+00:00" > 03/07/25, 16:58 </span>

    I checked different between subpage test 2 has extendToSubpages = 0 (working) and extendToSubpages = 1 (not working):

    if extendToSubpages = 0:

    1. in PreviewSimulator::process $rootlineRequiresPreviewFlag=true and $showHiddenPages is false
    2. in PreviewSimulator::process: VisibilityAspect is re-instantiated with first parameter true ($includeHiddenPages = true)
    3. in TSFE $this->context->aspects->visibility=> includeHidenPages=true

    if extendToSubpages = 1:

    1. in PreviewSimulator::process $rootlineRequiresPreviewFlag=false and $showHiddenPages is false
    2. in PreviewSimulator::process: VisibilityAspect is NOT re-instantiated, (is using default with $includeHiddenPages = false)
    3. in TSFE $this->context->aspects->visibility=> *includeHidenPages=false
    *

    In PreviewSimulator::checkIfRootlineRequiresPreview there is a comment:
    
    // Only check rootline if the current page has not set extendToSubpages itself
    // @see \TYPO3\CMS\Backend\Routing\PreviewUriBuilder::class
    if (!(bool)($pageInfo['extendToSubpages'] ?? false)) {

    It sound as if the extendToSubpages of a page has any influence on the visibility of the page itself, but it does not usually. It only has an influence on visibility of the descendants.

  2. Sybille Peters commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-11T12:00:08+00:00" > 04/11/25, 12:00 </span>

    Applied in changeset commit:4bd44cc2ca68af8ccc49e7b77f7fc68058a257cf.