Bug #106336
open403 Page Not Found when previewing not hidden page of hidden parent, both with extendToSubpages=1
0%
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
- create a page "test", set it as hidden=1; extendToSubpages=1
- create a subpage "test2" of "test", set it as visible (hidden=0) and extendToSubpages=1
- 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)
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
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
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.
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
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
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