Project

General

Profile

Actions

Bug #77722

closed

absRefPrefix is not applied everywhere

Added by Robert Vock over 7 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2016-08-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When I've set absRefPrefix, it is not set everywhere. One example is the srcset-attribute:

<img src="fileadmin/example.png" srcset="fileadmin/example.png 200w, fileadmin/example_400.png 400w">

gets converted to

<img src="/fileadmin/example.png" srcset="/fileadmin/example.png 200w, fileadmin/example_400.png 400w">

(only the first fileadmin in the srcset got replaced)

This happens because TypoScriptFrontendController::setAbsRefPrefix() just searches for "fileadmin as a simplification of finding attributes which start with a relative path.

One improvement would be to add the absRefPrefix in the getPublicUrl() method of ResourceStorage, if relativeToCurrentScript is false:
https://github.com/TYPO3/TYPO3.CMS/blob/84865ff97f567d412bf5b5cad4bc57aefaff3747/typo3/sysext/core/Classes/Resource/ResourceStorage.php#L1310

Then images which are used within srcset will already have the correct path. Of course this does not fix all missing prefixes, but at least all where FAL is used.


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #72164: "absRefPrefix = auto" does not work if PageGenerator is not usedClosed2015-12-11

Actions
Related to TYPO3 Core - Bug #82486: IncludeJS* / includeCSS* (including compression / concatenation) ignoring absRefPrefixClosed2017-09-14

Actions
Related to TYPO3 Core - Bug #82574: Inconsistent support of config.absRefPrefix in fluid/extbaseNew2017-09-28

Actions
Actions

Also available in: Atom PDF