Project

General

Profile

Actions

Bug #64277

closed

sourceCollection and absRefPrefix

Added by Heiko Kromm almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
Start date:
2015-01-14
Due date:
% Done:

0%

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

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.

Actions #1

Updated by Mathias Schreiber almost 10 years ago

  • Category set to Frontend
  • Target version set to 7.2 (Frontend)
Actions #2

Updated by Georg Ringer almost 10 years ago

  • Status changed from New to Closed

Thanks for creating the issue!

this should be a duplicate of #53292 which has been solved already.

if it is still valid for you, feel free to reopen it again!

Actions

Also available in: Atom PDF