Issue Bug Closed

#81944Invalid asset prefix when installed in a subdirectory

Xavier Perseguers 07/24/17, 08:17 updated 01/12/18, 13:28

Description

Since #81486 we have a regression in typo3/sysext/extbase/Classes/Service/ImageService.php for method getImageUrl()

That is broken, when TYPO3 is inside a sub directory and absRefPrefix is configured to be that sub directory.

localhost/master/
absRefPrefix = /master/

then the resulting URI will be /master/master/index.php.

In addition, Helmut suggests that we should wrap this in GeneralUtility::locationHeaderUrl() to make sure the final URI contains a scheme and host name. Only then we can be sure that all other code (including TS image URI code) will treat this as final UR within /typo3/sysext/core/Classes/Resource/ResourceStorage.php, 1237, that is the line:

$publicUrl = PathUtility::getAbsoluteWebPath('index.php') . '?' . http_build_query($queryParameterArray, '', '&', PHP_QUERY_RFC3986);

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.