Breaking: #107537 - Changes in URL generation of system resources
See forge#107537
Description
The following changes are considered breaking, although their impact is likely very low.
- TypoScript getData
pathreturned a relative URL and is now returning an absolute URL (prepended withabs).Ref Prefix - Access to FAL storages via relative path (
fileadmin/) is limited to the default storage defined intemplates/ main. css $GLOBALS.['TYPO3_ CONF_ VARS'] ['BE'] ['fileadmin Dir'] - All generated system resource URLs now contain cache busting.
- Additional query strings applied to the resource identifier will not disable cache busting.
getText "path" in TypoScript
page.20 = TEXT
page.20 {
data = path : EXT:core/Resources/Public/Icons/Extension.svg
}
"path" result before: typo3/sysext/core/Resources/Public/Icons/Extension.svg
"path" result now: /typo3/sysext/core/Resources/Public/Icons/Extension.svg
"path" result before: _assets/5f237792cbcdc97cfceade1e16ea33d7/Icons/Extension.svg
"path" result now: /_assets/5f237792cbcdc97cfceade1e16ea33d7/Icons/Extension.svg
Relative path to FAL Storage
Referencing resources via relative path does only work for the default FAL storage
defined in
$GLOBALS.
This means if you have other local FAL storages configured, you need to use the FAL resource syntax
(e.g. FAL:) to reference files in such storage instead of using relative paths
(e.g. my-).
It is generally recommended to use explicit resource identifiers (App resources or FAL resources),
instead of relative paths.
All generated URLs now contain cache busting
All URLs now have cache busting applied. This means URLs that had no cache busting applied, like Icon URLs will now have cache busting applied.
Additional query strings applied to the resource identifier
When adding a query string to a resource identifier, previously the cache busting was disabled. Now the query string is respected, but cache busting is added as well. It is recommended to drop the custom query string, when it was used for cache busting in places TYPO3 did not include cache busting previously.
page.20 = TEXT
page.20 {
data = asset : EXT:core/Resources/Public/Icons/Extension.svg?v=1234
}
result before: /typo3/sysext/core/Resources/Public/Icons/Extension.svg?v=1234
result now: /typo3/sysext/core/Resources/Public/Icons/Extension.svg?v=1234&1709051481
Impact
getText "path" in TypoScript
All installations using
path of TypoScript
data,
will now have these usages resolved to absolute URLs, instead of relative.
Relative path to FAL Storage
In installations referencing resources in additional local FAL storages using a relative path syntax, an exception is thrown.
All generated URLs now contain cache busting
URLs slightly differ from previous TYPO3 versions, especially when cache busting was not applied previously.
Additional query strings applied to the resource identifier
URLs differ from previous TYPO3 versions, as the cache busting is added additionally to the custom query string.
Affected installations
getText "path" in TypoScript
All installations using
path in TypoScript
data.
Relative path to FAL Storage
All installations referencing resources in additional local FAL storages using
a relative path syntax (e.g. my-).
All generated URLs now contain cache busting
All installations having third party code, that misuses generated URLs to assume file system paths from them.
Additional query strings applied to the resource identifier
All installations, that use resource identifiers with a custom query string,
like EXT:
Migration
Relative path to FAL Storage
Either convert the relative path to a FAL resource like so:
FAL:
Alternatively it is possible to convert it to a resource URI:
URI:/
The first will add cache busting, the latter will use the URI as is.