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 almost 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 #1

Updated by Benni Mack over 5 years ago

  • Status changed from New to Needs Feedback

Hi Dmitri,

how would you want to solve this? Using getters is a nasty idea. But we could of course, create a ->toArray() method in File objects (depends on which actual object you add).

This issue you describe also slows down the actual performance drastically....

Actions #2

Updated by Riccardo De Contardi almost 5 years ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or ping me.

Thank you and best regards

Actions

Also available in: Atom PDF