#82574Inconsistent support of config.absRefPrefix in fluid/extbase
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
Reviews 2
Related issues 4
- Bug #77722absRefPrefix is not applied everywhere
- Bug #87919config.absRefPrefix not working for links in HMENU, fluid generated links like <f:link.page ... or <f:link.typolink ...
- Bug #97324CSS / JS files not referenced correctly when concatenation and compression are disabled
- Bug #99135page.includeCSS with resource from fileadmin, the beginning slash is missing TYPO3 11.5.19
History 1434
Show 9 earlier messages
-
Susanne Moog changed category <span data-processor="relativetime" data-value="2017-10-17T23:12:44+00:00" > 10/17/17, 23:12 </span>
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2019-10-27T00:07:55+00:00" > 10/27/19, 00:07 </span>
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.pngYES {f:uri.image(src:'EXT:siteconf/Resources/Public/Assets/Images/sample1.png')}/foo/typo3conf/ext/siteconf/Resources/Public/Assets/Images/sample1.pngYES Moreover, the
absoluteparameter seems to work only forf:uri.imageand is ignored forf:uri.resourcealbeit the documentation mentions it: https://docs.typo3.org/other/typo3/view-helper-reference/9.5/en-us/typo3/fluid/latest/Uri/Resource.html#absoluteLook also at https://review.typo3.org/c/Packages/TYPO3.CMS/+/41682/
-
Riccardo De Contardi changed Related to #77722 <span data-processor="relativetime" data-value="2019-10-27T00:08:16+00:00" > 10/27/19, 00:08 </span>
-
Riccardo De Contardi changed Related to #87919 <span data-processor="relativetime" data-value="2019-11-10T21:59:01+00:00" > 11/10/19, 21:59 </span>
-
ondro no-lastname-given commented <span data-processor="relativetime" data-value="2020-05-14T15:27:52+00:00" > 05/14/20, 15:27 </span>
Can confirm too in typo3 v9.5.16
-
Christian Weiske commented <span data-processor="relativetime" data-value="2023-05-09T13:26:40+00:00" > 05/09/23, 13:26 </span>
Using
<f:asset.script src="EXT:myext/file.js">fails to takeabsRefPrefixinto account on TYPO3 v11.5.25. -
Riccardo De Contardi changed Related to #97324 <span data-processor="relativetime" data-value="2023-08-06T08:00:19+00:00" > 08/06/23, 08:00 </span>
-
Riccardo De Contardi changed Related to #99135 <span data-processor="relativetime" data-value="2023-08-06T08:00:25+00:00" > 08/06/23, 08:00 </span>
-
Benni Mack commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-12-10T14:57:07+00:00" > 12/10/24, 14:57 </span>Can you recheck with v13 now please?
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2024-12-12T15:58:17+00:00" > 12/12/24, 15:58 </span>
I repeated the test on my comment #3 on version 13.4.2:
TS Setup
config { absRefPrefix = /foo/ }and the result looks pretty much the same:
Fluid code Result Absrefprexix applied? <img src="{f:uri.resource(path:'EXT:siteconf/Resources/Public/Assets/Images/sample1.png')}" /><img src="/_assets/b1172fb14b6ddce973de6fe465238c63/Assets/Images/sample1.png
" />NO <div style="background-image: url({f:uri.resource(path:'EXT:siteconf/Resources/Public/Assets/Images/sample1.png')})"></div><div style="background-image: url(/_assets/b1172fb14b6ddce973de6fe465238c63/Assets/Images/sample1.png)"></div>NO <f:uri.image src="EXT:siteconf/Resources/Public/Assets/Images/sample1.png" />/foo/_assets/b1172fb14b6ddce973de6fe465238c63/Assets/Images/sample1.pngYES {f:uri.image(src:'EXT:siteconf/Resources/Public/Assets/Images/sample1.png')}/foo/_assets/b1172fb14b6ddce973de6fe465238c63/Assets/Images/sample1.pngYES Note
the
absoluteparameter now works for bothf:uri.imageandf:uri.resource -
Benni Mack commented and changed status
Needs FeedbackAccepted <span data-processor="relativetime" data-value="2024-12-12T20:45:35+00:00" > 12/12/24, 20:45 </span>Completely valid (and I hate it :)).
Here we go:
- f:uri.image takes the src attribute and considers this a FAL object, so FAL API is applied. However, the “problem” is that FAL considers this “fallback storage” which is the main problem here.
- f:uri.resource considers this a “file or folder somewhere on the TYPO3 installation” which IMHO is correct (as absRefPrefix is not applied AFAIK).So the real solution is to get rid of this fallback storage concept first.
One other solution would be to fix the “applyAbsRefPrefix” to check for “/_assets” nowadays as well.
-
Gerrit Code Review pushed patch set 65 for main to change 90675 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2025-10-22T10:02:16+00:00" > 10/22/25, 10:02 </span> -
Gerrit Code Review pushed patch set 66 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-22T10:02:29+00:00" > 10/22/25, 10:02 </span>
-
Gerrit Code Review pushed patch set 67 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-22T11:01:57+00:00" > 10/22/25, 11:01 </span>
-
Gerrit Code Review pushed patch set 68 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-22T18:36:09+00:00" > 10/22/25, 18:36 </span>
-
Gerrit Code Review pushed patch set 69 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-22T19:41:52+00:00" > 10/22/25, 19:41 </span>
-
Gerrit Code Review pushed patch set 70 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T06:19:23+00:00" > 10/23/25, 06:19 </span>
-
Gerrit Code Review pushed patch set 71 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T11:08:13+00:00" > 10/23/25, 11:08 </span>
-
Gerrit Code Review pushed patch set 72 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T12:08:29+00:00" > 10/23/25, 12:08 </span>
-
Gerrit Code Review pushed patch set 73 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T12:15:52+00:00" > 10/23/25, 12:15 </span>
-
Gerrit Code Review pushed patch set 74 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T12:23:11+00:00" > 10/23/25, 12:23 </span>
-
Gerrit Code Review pushed patch set 75 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T12:24:55+00:00" > 10/23/25, 12:24 </span>
-
Gerrit Code Review pushed patch set 76 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T12:31:09+00:00" > 10/23/25, 12:31 </span>
-
Gerrit Code Review pushed patch set 77 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T12:41:17+00:00" > 10/23/25, 12:41 </span>
-
Gerrit Code Review pushed patch set 78 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-23T12:54:55+00:00" > 10/23/25, 12:54 </span>
-
Gerrit Code Review pushed patch set 79 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-24T18:37:21+00:00" > 10/24/25, 18:37 </span>
-
Gerrit Code Review pushed patch set 80 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-25T10:03:46+00:00" > 10/25/25, 10:03 </span>
-
Gerrit Code Review pushed patch set 81 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-25T10:05:16+00:00" > 10/25/25, 10:05 </span>
-
Gerrit Code Review pushed patch set 82 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-25T10:08:15+00:00" > 10/25/25, 10:08 </span>
-
Gerrit Code Review pushed patch set 83 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-25T10:25:17+00:00" > 10/25/25, 10:25 </span>
-
Gerrit Code Review pushed patch set 84 for main to change 90675 <span data-processor="relativetime" data-value="2025-10-25T10:53:21+00:00" > 10/25/25, 10:53 </span>
-
Helmut Hummel commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-10-25T19:35:10+00:00" > 10/25/25, 19:35 </span>Applied in changeset commit:5d637429cff45078d813436dd289aab6dd24a91b.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:36:45+00:00" > 12/02/25, 14:36 </span>
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