Bug #82574
open
Inconsistent support of config.absRefPrefix in fluid/extbase
Added by Rémy DANIEL about 7 years ago.
Updated over 1 year ago.
Description
Hi
As an integrator I would like to see config.absRefPrefix used everywhere in the same way over my templates.
When building an uri with typolink: OK, absRefPrefix is prepended to the uri
When building an uri for an image with f:uri.image: OK, absRefPrefix is prepended to the uri
When building an uri for a resource with f:uri.resource: not OK, absRefPrefix is not prepended to the uri
Would it be possible to have a consistent usage of config.absRefPrefix all over fluid/extbase/cObj ?
Cheers
Perhaps related tickets: #81486, #82486, #77722
Something also weird. In a fluid template:
<img src="{f:uri.resource(...)}" />
--> output an uri correctly prefixed with absRefPrefix
<div style="background-image: url({f:uri.resource(...)))"></div>
--> uri is not prefixed with absRefPrefix
Test done with 9.5.0 and:
- an image EXT:siteconf/Resources/Public/Assets/Images/sample1.png
- TS Setup:
config {
absRefPrefix = /foo/
}
Fluid code |
Result |
Absrefprexix applied? |
<img src="{f:uri.resource(path:'Assets/Images/sample1.png')}" /> |
<img src="/typo3conf/ext/siteconf/Resources/Public/Assets/Images/sample1.png" /> |
NO |
<div style="background-image: url({f:uri.resource(path:'Assets/Images/sample1.png')})"></div> |
<div style="background-image: url(/typo3conf/ext/siteconf/Resources/Public/Assets/Images/sample1.png)"></div> |
NO |
<f:uri.image src="EXT:siteconf/Resources/Public/Assets/Images/sample1.png" /> |
/foo/typo3conf/ext/siteconf/Resources/Public/Assets/Images/sample1.png |
YES |
{f:uri.image(src:'EXT:siteconf/Resources/Public/Assets/Images/sample1.png')} |
/foo/typo3conf/ext/siteconf/Resources/Public/Assets/Images/sample1.png |
YES |
Moreover, the absolute
parameter seems to work only for f:uri.image
and is ignored for f:uri.resource
albeit the documentation mentions it: https://docs.typo3.org/other/typo3/view-helper-reference/9.5/en-us/typo3/fluid/latest/Uri/Resource.html#absolute
Look also at https://review.typo3.org/c/Packages/TYPO3.CMS/+/41682/
- Related to Bug #77722: absRefPrefix is not applied everywhere added
- Related to Bug #87919: config.absRefPrefix not working for links in HMENU, fluid generated links like <f:link.page ... or <f:link.typolink ... added
Can confirm too in typo3 v9.5.16
Using <f:asset.script src="EXT:myext/file.js">
fails to take absRefPrefix
into account on TYPO3 v11.5.25.
- Related to Bug #97324: CSS / JS files not referenced correctly when concatenation and compression are disabled added
- Related to Bug #99135: page.includeCSS with resource from fileadmin, the beginning slash is missing TYPO3 11.5.19 added
Also available in: Atom
PDF