Feature #88380
closedBasic auth options for PageContentErrorHandler
0%
Description
The custom PageContentErrorHandler in TYPO3 9.5 works great, but depending on the environment, there can be a basic auth set for the website (like on a staging server). The PageContentErrorHandler is using guzzle with an empty options array to fetch the configured 404 page. With basic auth set, this will always throw a runtime exception, because guzzle coudn't fetch the page.
So it would be great to be able to configure basic auth options for the PageContentErrorHandler per environment.
Or maybe this would be a possible configuration option for the "variants" array in the site configuration?
Updated by Benni Mack over 5 years ago
Hey,
we actually found a way to do the PageContentErrorHandler without an external PHP request (basically calling a new FrontendApplication with a custom FrontendReqeust again), so this would be obsolete.
Would that be feasable?
Updated by Christian Eßl over 5 years ago
Sounds great. Then this would be obsolete.
Updated by Benni Mack over 5 years ago
Christian Eßl wrote:
Sounds great. Then this would be obsolete.
This is how you can already achieve this with a custom error handler in v9 https://gist.github.com/bmack/06bb00bfee09b7c5b79fd981c64fa9c9
Updated by Riccardo De Contardi about 5 years ago
- Status changed from New to Needs Feedback
@Christian Eßl Hi, I would like to ask you if there is still something that should be done on this topic or TYPO3 already covers the functionality you asked for. Thank you!
Updated by Christian Eßl about 5 years ago
@Riccardo De Contardi
I'm not sure. Is there currently a plan to add the improved PageContentErrorHandler, provided in the gist, to the core? Would be a really nice addition for TYPO3 10.
Updated by Riccardo De Contardi about 5 years ago
- Status changed from Needs Feedback to New
@Christian Eßl unfortunately I can't answer you on that; I put your issue as "new"
Updated by Benni Mack about 5 years ago
Christian Eßl wrote:
@Riccardo De Contardi
I'm not sure. Is there currently a plan to add the improved PageContentErrorHandler, provided in the gist, to the core? Would be a really nice addition for TYPO3 10.
Sure, we need to find a way to do this properly without side effects, which is quite the most difficult part, we still have a lot of places where we deal with global state ($GLOBALS[TSFE] and GeneralUtility::getIndpEnv()). Once we solved this, we can tackle this change.
Updated by Christian Eßl over 4 years ago
Ticket can be closed. Is now obsolete with #90505 merged.
Updated by Björn Jacob over 4 years ago
- Status changed from New to Closed
Thanks Christian for your feedback. Closing this issue as requested.