#64277sourceCollection and absRefPrefix
Description
Hi,
I want to render a sourcecollection to use foundation interchange. Therefore I have set up my sourceCollection this way:
tt_content.image.20.1 {
layout {
foundation_example {
element (
<img data-interchange="###SOURCECOLLECTION###" ###PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###>
<noscript>
<img src="###SRC###" ###PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###>
</noscript>
)
source = [###SRC###, (###DATAKEY###)]
source.noTrimWrap = ;;, ; |*| ;;, ; |*| ;;;
source.noTrimWrap.splitChar = ;
}
}
}
I want to use config.absRefPrefix=/ but the / will not be prepended to the image path.
I debugged a little bit and it seems that the sourceCollection is created in ContentObjectRendere.php always without the absRefPrefix.
The absRefPrefix seems to be added anywhere else.
I compared my settings to the shipped layoutKey=data.
And it looks like the filePath has to be wrapped by quotes to force typo3 to add absRefPrefix.
Example:
Before substituteMarkerArray (ContentObjectRenderer.php Line 1307) sourceCollection looks like this:
sourceCollection = data-default="fileadmin/gfx/im1.jpg" data-small="fileadmin/gfx/im1.jpg" data-medium="fileadmin/gfx/im1.jpg"
results in
data-default="/fileadmin/gfx/im1.jpg" data-small="/fileadmin/gfx/im1.jpg" data-medium="/fileadmin/gfx/im1.jpg"
but
sourceCollection = [fileadmin/gfx/im1.jpg, (default)], [fileadmin/gfx/im1.jpg, (small)]
results in
[fileadmin/gfx/im1.jpg, (default)], [fileadmin/gfx/im1.jpg, (small)]
As a workaround I can manually prepend the absRefPrefix like this:
tt_content.image.20.1.layout.foundation_example.source = [/###SRC###, (###DATAKEY###)]
but I think TYPO3 should always append the absRefPrefix to SRC.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.