Project

General

Profile

Actions

Bug #106336

open

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

Added by Sybille Peters 17 days ago. Updated 16 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2025-03-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
14
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #87392: Subpages of hidden pages with extendToSubpages activated cannot be accessed even with backend loginClosed2019-01-10

Actions
Related to TYPO3 Core - Bug #104629: 403 for pages in FE if admin-panel active and non-admin user opens page with no permission in BENew2024-08-15

Actions
Actions #1

Updated by Sybille Peters 17 days ago

  • Related to Bug #87392: Subpages of hidden pages with extendToSubpages activated cannot be accessed even with backend login added
Actions #2

Updated by Sybille Peters 17 days ago

  • Description updated (diff)
Actions #3

Updated by Sybille Peters 17 days ago

  • Description updated (diff)
Actions #4

Updated by Sybille Peters 17 days ago

  • Related to Bug #104629: 403 for pages in FE if admin-panel active and non-admin user opens page with no permission in BE added
Actions #5

Updated by Sybille Peters 17 days ago

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.

Actions #6

Updated by Gerrit Code Review 17 days ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88537

Actions #7

Updated by Gerrit Code Review 17 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88537

Actions #8

Updated by Gerrit Code Review 16 days ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88537

Actions #9

Updated by Sybille Peters 16 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF