-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Move rootPage resolving into PSR-15 middleware
The functionality to resolve the "domain start page" - the page ID where a sys_domain record is found, is moved from TSFE/sys_page into the SiteResolver middleware, making the domain start page value available at an earlier point of a request. Change of behaviours: - TSFE->domainStartPage is now filled earlier than before - TSFE->domainStartPage is now filled regardless of access checks of the permissions of that page record, as the check is done later-on again anyways. For the sake of completeness: If a site is configured, this code is not executed anymore, as the site contains the rootpage ID already anyways. The method "TypoScriptFrontendController->findDomainRecord" is removed, as it was marked as private and should have not been used outside TYPO3 Core. The method "PageRepository->getDomainStartPage" is marked as deprecated as it is not called anymore. Resolves: #84725 Releases: master Change-Id: I5c420701eb463630d6286578ff582cb0e4e1dd35 Reviewed-on: https://review.typo3.org/56664 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Frans Saris <franssaris@gmail.com> Tested-by: Frans Saris <franssaris@gmail.com> Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de> Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org>
- Loading branch information
Showing
5 changed files
with
150 additions
and
35 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
...on/Changelog/master/Deprecation-84725-SysDomainResolvingMovedIntoMiddleware.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
================================================================ | ||
Deprecation: #84725 - sys_domain resolving moved into middleware | ||
================================================================ | ||
|
||
See :issue:`84725` | ||
|
||
Description | ||
=========== | ||
|
||
The PHP method `PageRepository->getDomainStartPage()` has been marked as deprecated. | ||
|
||
The PHP method `TypoScriptFrontendController->findDomainRecord()` which was marked | ||
as internal, has been removed. | ||
|
||
As both methods have been used to resolve the root page ID of the current request, | ||
they were solely there to fill :php:`$GLOBALS['TSFE']->domainStartPage` which is now filled | ||
at an earlier stage through the :php:`SiteResolver` middleware. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Calling the PageRepository method will trigger a deprecation warning. | ||
|
||
Calling the TypoScriptFrontendController method will result in a fatal PHP error. | ||
|
||
|
||
Affected Installations | ||
====================== | ||
|
||
TYPO3 installations with third-party extensions calling the methods directly, usually | ||
related to resolve a page ID or to mimic a frontend call. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
If the return value is needed, access :php:`$GLOBALS['TSFE']->domainStartPage` directly. | ||
|
||
If the functionality is used in a third-party functionality and still needed, | ||
ensure to extend from `SiteResolver` middleware to call the now-protected method equivalents | ||
instead. | ||
|
||
.. index:: Frontend, PHP-API, FullyScanned, ext:frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters