Project

General

Profile

Actions

Bug #80240

closed

f:image generate wrong relative path

Added by Dieter Porth about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-03-11
Due date:
% Done:

0%

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

Description

TYPO3 8.6.1 updated via composer 6.3.2017
usage of realUrl
XAMPP PHP 7.0.5

Situation

I use the following f:image-Viewhelper in a su

                                    <f:image src="{cartoon.picture.0.originalResource.uid}" 
                                             treatIdAsReference="1" 
                                             width="{picWidth}m" 
                                             height="{picHeight}m" 
                                             title="{picTitle}" 
                                             alt="{picAlt}" 
                                             id="{ridPicture}" 
                                             style="width:100%; height: auto;" 
                                    />


It generate the following IMG-Tag for the page with the RealUrl-link "http://comic.local/2017-de/test/".
<img id="basecartoon-10_cartoon-1_dimension-2_rotation--size-_picture-" style="width:100%; height: auto;" src="fileadmin/_processed_/e/9/csm_allow_colors_in_your_live_06705570a2.jpg" alt="Für ein buntes Leben" title="Lass Farbe in dein Leben" width="210" height="158">

If I add a leading-'/' to the src-adress, the browser will find the rendered image.
<img id="basecartoon-10_cartoon-1_dimension-2_rotation--size-_picture-" style="width:100%; height: auto;" src="/fileadmin/_processed_/e/9/csm_allow_colors_in_your_live_06705570a2.jpg" alt="Für ein buntes Leben" title="Lass Farbe in dein Leben" width="210" height="158">

The browser can't find the image "http://comic.local/2017-de/test/fileadmin/_processed_/e/9/csm_allow_colors_in_your_live_06705570a2.jpg" (403-error)

Actions #1

Updated by Riccardo De Contardi about 7 years ago

maybe mine is just a silly question:

Are config.baseURL or config.absRefPrefix set?

Actions #2

Updated by Frans Saris about 7 years ago

  • Status changed from New to Needs Feedback

Like Riccardo mentions this sounds like a missing config.baseURL or config.absRefPrefix (see https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#absrefprefix)

Actions #3

Updated by Dieter Porth about 7 years ago

I don't use config.baseUrl.
I don't use config.absRefPrefix.
The image-Viewhelper worked without any configuration under TYPO3 7.6
After I transfered the extension to TYPO3 8.6, the viewhelper don't worked anymore.

The description of the viewhelper don't gave a hint, that I have to make special configurations for the usage of it.
I use the viewhelper in an extension and I have normally no influence to the used configuration.

The hint implies, that the viewhelper unter TYPO3 8.6 needs now special configurations.
The TYPO3-rule "convention over configuration" won't work anymore for this special case. A hint in the description of the viewhelper would be helpful.

If I use "config.absRefPrefix" in my case, the viewhelper worked like expected.

Thanks for help.

Actions #4

Updated by Frans Saris about 7 years ago

So when a TYPO3 installation is installed in a subfolder and not in the root of the web domain the images worked in v7 and this is now with v8 broken?

But for realurl to work you will need to have config.baseURL or config.absRefPrefix set.

Actions #5

Updated by Dieter Porth about 7 years ago

Your description: so it seems to me in the first view. After you remark I took a second view and found out, that in my TYPO3 7.6 System my extensionstest works only in the startpage. :-(

I took a look into the documentation of realUrl. There is no hint avaiable, that I have to use 'baseUrl' or 'absRefPrefix'.

Remark: I also realized, that the typoscript option 'prefixLocalAnchors' don't exists anymore under typo3 7.6 and 8.

Actions

Also available in: Atom PDF