-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation: #94193 - Public URLs with relative paths in FAL API #2591
Labels
Comments
helsner
added a commit
that referenced
this issue
Nov 6, 2021
simonschaufi
pushed a commit
that referenced
this issue
Nov 18, 2023
Tbh: It is not that easy as i initially thought. Just close it. |
simonschaufi
pushed a commit
that referenced
this issue
Mar 11, 2024
simonschaufi
pushed a commit
that referenced
this issue
Apr 16, 2024
simonschaufi
pushed a commit
that referenced
this issue
Apr 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Deprecation: #94193 - Public URLs with relative paths in FAL API
https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/11.3/Deprecation-94193-PublicUrlWithRelativePathsInFALAPI.html
.. include:: ../../Includes.txt
================================================================
Deprecation: #94193 - Public URLs with relative paths in FAL API
See :issue:
94193
Description
The public FAL API for accessing the public url of a FAL object,
for example :php:
\TYPO3\CMS\Core\Resource\FileReference
or:php:
\TYPO3\CMS\Core\Resource\Folder
, previously allowed toretrieve the relative path instead of the absolute path. This could
be achieved by setting :php:
$relativeToCurrentScript
to :php:true
while calling :php:
getPublicUrl()
.FAL is only able to build relative links for local drivers. Other drivers
would still return the absolute URL, which has often led to unexpected
side effects.
Since both, frontend (site handling) and backend (url routing) are meanwhile
fully capable of supporting absolute URLs, :php:
$relativeToCurrentScript
is now deprecated and will be removed in TYPO3 v12.
This also affects the :php:
isRelativeToCurrentScript()
method in the:php:
GeneratePublicUrlForResourceEvent
event, as well as the:php:
OnlineMediaHelperInterface
.Impact
Calling :php:
getPublicUrl()
on a FAL object, for example:php:
\TYPO3\CMS\Core\Resource\FileReference
or:php:
\TYPO3\CMS\Core\Resource\Folder
, with :php:$relativeToCurrentScript
set to :php:
true
will trigger a PHP :php:
E_USER_DEPRECATED
error. The extension scannerwill detect such calls.
Accessing :php:
isRelativeToCurrentScript()
on:php:
GeneratePublicUrlForResourceEvent
will trigger a PHP:php:
E_USER_DEPRECATED
error. The extension scanner will detectsuch calls.
Manually calling :php:
getPublicUrl()
on an :php:OnlineMediaHelper
,for example :php:
YoutubeHelper
, will not trigger a PHP :php:E_USER_DEPRECATED
error, but the extension scanner will detect such calls.
Affected Installations
All installations which set :php:
$relativeToCurrentScript
to :php:true
when calling :php:
getPublicUrl()
on a FAL object, for example:php:
\TYPO3\CMS\Core\Resource\FileReference
or:php:
\TYPO3\CMS\Core\Resource\Folder
.All installations which manually call :php:
getPublicUrl()
on an:php:
\TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelper
,for example :php:
\TYPO3\CMS\Core\Resource\Rendering\YoutubeRenderer
.All installation which access :php:
isRelativeToCurrentScript()
on the:php:
\TYPO3\CMS\Core\Resource\Event\GeneratePublicUrlForResourceEvent
event.Migration
Remove the :php:
$relativeToCurrentScript
parameter from all calls to:php:
getPublicUrl()
on FAL objects, for example:php:
\TYPO3\CMS\Core\Resource\FileReference
or:php:
\TYPO3\CMS\Core\Resource\Folder
.Remove the :php:
$relativeToCurrentScript
parameter from all manual callsto :php:
getPublicUrl()
on a:php:
\TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelper
,for example :php:
\TYPO3\CMS\Core\Resource\Rendering\YoutubeRenderer
.Remove all calls to
:php:
\TYPO3\CMS\Core\Resource\Event\GeneratePublicUrlForResourceEvent->isRelativeToCurrentScript()
... index:: FAL, PHP-API, FullyScanned, ext:core
The text was updated successfully, but these errors were encountered: