-
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] Remove TCEMAIN.previewDomain
The functionality to set a custom TCEMAIN.previewDomain via PageTS is not in use anymore as SiteHandling is using the proper domain anyway already. Conceptually this does not work anymore, as the base (domain + path prefix) determines Language + Site / PageTree entry point. Setting this to something else via TCEMAIN.previewDomain would not work anyways, so this hack is removed, as we now can safely determine the full (speaking) URL with Site Handling. In addition, the method BackendUtility::getViewDomain() is now deprecated. Resolves: #88499 Releases: master Change-Id: Id88c16e2e86ccce8a2e7be02af0e2a39802624c0 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60773 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Susanne Moog <look@susi.dev> Tested-by: Daniel Gorges <daniel.gorges@b13.de> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Susanne Moog <look@susi.dev> Reviewed-by: Daniel Gorges <daniel.gorges@b13.de> Reviewed-by: Benni Mack <benni@typo3.org>
- Loading branch information
Showing
14 changed files
with
172 additions
and
204 deletions.
There are no files selected for viewing
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
24 changes: 24 additions & 0 deletions
24
typo3/sysext/core/Classes/Routing/UnableToLinkToPageException.php
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,24 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
namespace TYPO3\CMS\Core\Routing; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
/** | ||
* Exception thrown when a link to a page (or page in a specific translation) cannot be built. | ||
*/ | ||
class UnableToLinkToPageException extends \TYPO3\CMS\Core\Exception | ||
{ | ||
} |
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
45 changes: 45 additions & 0 deletions
45
...ocumentation/Changelog/master/Deprecation-88499-BackendUtilitygetViewDomain.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,45 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
=================================================== | ||
Deprecation: #88499 - BackendUtility::getViewDomain | ||
=================================================== | ||
|
||
See :issue:`88499` | ||
|
||
Description | ||
=========== | ||
|
||
The static method :php:`TYPO3\CMS\Backend\Utility\BackendUtility::getViewDomain()` has been marked | ||
as deprecated, as it has been superseded by directly using the PageRouter of Site Handling. | ||
|
||
Site Handling allows to generate proper frontend preview URLs the same way as TYPO3 Core does in | ||
all other places,by calling the PageRouter of a Site object directly, so the workarounds are not | ||
necessary anymore, making this method obsolete. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Calling :php:`BackendUtility::getViewDomain()` will trigger a deprecation warning. | ||
|
||
|
||
Affected Installations | ||
====================== | ||
|
||
Any TYPO3 installations with custom extensions that call this method. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
Substitute the method by directly detecting a site based on a given Page ID in the TYPO3 Backend. | ||
Call the `getRouter()` method on this Site object to create proper links to pages in TYPO3 Frontend. | ||
|
||
Example with additional GET parameters: | ||
|
||
:php: | ||
|
||
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageId); | ||
$url = $site->getRouter()->generateUri($pageId, ['type' => 13]); | ||
|
||
.. index:: PHP-API, FullyScanned |
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
Oops, something went wrong.