Bug #104320
openBroken page rendering with PropagateResponseException from extbase
0%
Description
When the reponse object from a ErrorController->pageNotFoundAction
is thrown from an extbase action, page rendering is broken, if a 404 page error handler is configured. Instead of showing the content of the 404 page, the output containts 2 body tags mixed up with content from the original page and the configured 404 error page.
Prerequisites:
- TYPO3 page with a 404 page error handler, which shows the content of a page. The error page should at least contain a content element with some text.
- Extbase plugin with one action. Action must throw a
PropagateResponseException
, containing a Response-Object generated byErrorController->pageNotFoundAction
- see example below
$response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction( $this->request, 'Exit from action' ); throw new PropagateResponseException($response, 1720242346);
How to reproduce
1. Create a new page named "Extbase Plugin"
2. Insert a "Regular Text Element" content element on the page and fill out header and add some text
3. Insert the extbase plugin on the page
4. Flush the TYPO3 cache
5. Open a non existing URL -> The configured 404 page content is shown ✅
6. Open the page with the extbase plugin -> The content of the configured 404 page is shown ✅
7. Flush the TYPO3 cache
8. Open the page with the extbase plugin -> The content (created in step 2) of the page "Extbase Plugin" is shown and additionally, the content of the 404 page. HTML output has 2 body tags . ❌
9. Open a non existing URL -> Same af for step 8 - 404 page seems to be cached wrong ❌
Updated by Christian Kuhn 5 months ago
- Related to Bug #95174: pageNotFoundAction not working properly in Extbase with feature toggle subrequestPageErrors turned on added
Updated by Georg Ringer 5 months ago
- Is duplicate of Bug #103215: PageContentErrorHandler attaches error output to current response's output instead of replacing it. added
Updated by Benni Mack about 1 month ago
- Target version changed from 13.3 to Candidate for Major Version