Project

General

Profile

Actions

Bug #82235

closed

CObject Viewhelper with image object as data attribute leads to flodding of typo3temp folder

Added by Dimitri König over 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-08-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi there

There is an issue with cObject Viewhelper and image filereferences as data attribute, wether it's v7 or v8.

<f:cObject typoscriptObjectPath="lib.image.myfancyimage" data="{image}" />

This results in the viewhelper calling all gettable methods on that image object to get an data array:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php#L109

But due to an interesting getter method for local copies of that image you get you typo3temp folder flooded:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Resource/FileReference.php#L475

Current workaround which is not that good due to some data which gets lost is this:

<f:cObject typoscriptObjectPath="lib.image.myfancyimage" data="{uid: image.uid}" />

It still would be better and more useful to actually be able to give a whole object as a data attribute to use some properties as one likes.

Thx
Best
Dimitri

Actions

Also available in: Atom PDF