Bug #82574

Inconsistent support of config.absRefPrefix in fluid/extbase

Added by DANIEL Rémy over 2 years ago. Updated 3 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2017-09-28
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues

Related to TYPO3 Core - Bug #77722: absRefPrefix is not applied everywhere New 2016-08-31
Related to TYPO3 Core - Bug #87919: config.absRefPrefix not working for links in HMENU, fluid generated links like <f:link.page ... or <f:link.typolink ... New 2019-03-15

History

#1 Updated by DANIEL Rémy over 2 years ago

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

#2 Updated by Susanne Moog over 2 years ago

  • Category set to Extbase

#3 Updated by Riccardo De Contardi 3 months ago

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/

#4 Updated by Riccardo De Contardi 3 months ago

  • Related to Bug #77722: absRefPrefix is not applied everywhere added

#5 Updated by Riccardo De Contardi 2 months ago

  • Related to Bug #87919: config.absRefPrefix not working for links in HMENU, fluid generated links like <f:link.page ... or <f:link.typolink ... added

Also available in: Atom PDF