[FEATURE] Allow PageContentErrorHandler to resolve pages with sub requests
The PageContentErrorHandler provided by the core can take in either a URL or a page uid for resolving an error page in the frontend. In both cases, the class would then start a Guzzle/cURL request to fetch the error page content. This has now been changed for internal pages, where a page uid has been given. In this case, the PageContentErrorHandler will now dispatch an internal SubRequest instead, to avoid an unnecessary cURL call. In staging environments, the website would often be access protected with basic auth options (for example a .htpasswd auth file on Apache Webservers). In such a case, error pages with the default PageContentErrorHandler would have failed before, as the internal cURL call for fetching the error page was lacking these required basic auth options. For internal pages, a sub request is now used, bypassing the need for an external cURL call. This solution is mostly based on Benni Mack's LocalPageContentErrorHandler with his approval. Resolves: #90505 Releases: master Change-Id: I9da835cd42503d7a52f9050ae5658eae53336a56 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63389 Reviewed-by:Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Susanne Moog <look@susi.dev> Tested-by:
Georg Ringer <georg.ringer@gmail.com>
Showing
- typo3/sysext/core/Classes/Error/PageErrorHandler/PageContentErrorHandler.php 65 additions, 40 deletions...lasses/Error/PageErrorHandler/PageContentErrorHandler.php
- typo3/sysext/core/Documentation/Changelog/master/Feature-90505-MakePageContentErrorHandlerResolveInternalPagesWithSubRequests.rst 23 additions, 0 deletions...ontentErrorHandlerResolveInternalPagesWithSubRequests.rst
Please register or sign in to comment