97996[BUGFIX] Show one preview info box on error pages
Commit message
Show more Show less
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 4
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/96/97996/4 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/96/97996/4 && git cherry-pick FETCH_HEAD
Review
-
Code review CR +1 Needs a vote
- Garvin Hicking +1
-
Verified V +1 Needs a vote
- Garvin Hicking +1
- core-ci +1 CI
Merge conflicts 4
Issues 1
Files 5
- typo3/sysext/core/Classes/Error/PageErrorHandler/PageContentErrorHandler.php2+4 −1
- typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php+5 −0
- typo3/sysext/workspaces/Tests/Functional/Middleware/Fixtures/WorkspacePreview.csvnew+10 −0
- typo3/sysext/workspaces/Tests/Functional/Middleware/Fixtures/WorkspacePreview.typoscriptnew+3 −0
- typo3/sysext/workspaces/Tests/Functional/Middleware/WorkspacePreviewTest.phpnew+89 −0
Review log 1014
-
Matthias Vogel uploaded patch set 1 11/25/26, 08:24
-
core-ci voted on patch set 1 V +1 11/25/26, 08:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115375
-
Benjamin Kott uploaded patch set 2
V +111/27/26, 02:11 -
Benjamin Kott commented on patch set 2 11/27/26, 02:11
Patch set 2 rebases the change onto current main (62d2eb1c3d5). It applied without conflicts. The fix is unchanged. One change to the test: it now also asserts the data-live-url of the box that remains. The commit message keeps the box of the outer request on purpose, because only that box carries the URI the browser requested. The box of the sub-request carries the URI of the error page (/404), so its live URL and its link to stop the preview point there. The previous test counted the boxes only, so it also passed with a fix that keeps the box of the sub-request instead. I checked that: with such a variant the new assertion fails, and with your fix it passes. Verified locally on SQLite: without the fix the new test fails (2 boxes instead of 1). With the fix, Workspaces Tests/Functional/Middleware and EventListener and core Tests/Functional/Error pass, and cgl -n and checkIntegrityPhp are green. A note on the backport to 14.3, not changed here: 14.3 has no change highlighting script. Both boxes are added there too, but the outer box lies on top and carries the correct links. So the symptom the commit message describes (the checkbox has no effect) does not exist on 14.3. Please take a look at whether the message, or the backport, should say that. -
core-ci voted on patch set 2 V +1 11/27/26, 02:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115647
-
Matthias Vogel uploaded patch set 3
V +111/27/26, 09:23 -
Matthias Vogel commented on patch set 3 11/27/26, 09:24
$Thank you, Benjamin, for the stronger test. The check of data-live-url makes sure that the outer box stays and the inner box goes.\n\nGarvin, thank you for the hint about originalRequest. This patch set removes this check. PageContentErrorHandler now sets its own attribute on the sub-request for the error page (PageContentErrorHandler::ERROR_PAGE_SUB_REQUEST_ATTRIBUTE, marked @internal). WorkspacePreview checks only this attribute. Other sub-requests that set originalRequest keep the info box. A new test shows this.\n\nAbout 14.3: I agree. On 14.3 the error page also gets two boxes. But the outer box is on top, thus the user sees no defect. I propose that the commit message of the 14.3 backport says that the change removes the duplicate box. The message for main stays as it is. -
Matthias Vogel commented on patch set 3 11/27/26, 09:24
Thank you, Benjamin, for the stronger test. The check of data-live-url makes sure that the outer box stays and the inner box goes. Garvin, thank you for the hint about originalRequest. This patch set removes this check. PageContentErrorHandler now sets its own attribute on the sub-request for the error page (PageContentErrorHandler::ERROR_PAGE_SUB_REQUEST_ATTRIBUTE, marked @internal). WorkspacePreview checks only this attribute. Other sub-requests that set originalRequest keep the info box. A new test shows this. About 14.3: I agree. On 14.3 the error page also gets two boxes. But the outer box is on top, thus the user sees no defect. I propose that the commit message of the 14.3 backport says that the change removes the duplicate box. The message for main stays as it is. -
core-ci voted on patch set 3 V +1 11/27/26, 09:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115690
-
Garvin Hicking commented on patch set 3 11/27/26, 10:53
PageContentErrorHandler.php:47We use the identifier verbatim in most of the core code. I'd like to keep it that way, also to have it better greppable, to not introduce a constant for this. -
Matthias Vogel uploaded patch set 4
V +111/27/26, 11:14Use the request attribute name verbatim instead of a constant. -
Matthias Vogel commented on patch set 3 11/27/26, 11:14
PageContentErrorHandler.php:47ReplyDone in patch set 4. The constant is gone. PageContentErrorHandler and WorkspacePreview now use 'frontend.errorPage.subRequest' verbatim. -
core-ci voted on patch set 4 V +1 11/27/26, 11:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115712
-
Garvin Hicking voted on patch set 4 CR +1 V +1 11/27/26, 22:28