Project

General

Profile

Actions

Bug #82977

closed

FAL: Metainformation of filelist not accessable

Added by Markus Gehrig about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2017-11-11
Due date:
% Done:

0%

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

Description

Used Version: TYPO3 8.7.8 on Linux/Apache and a custom extension.

At the moment I can not access the metainformation set in the filelist. I can see the title and description set in the filelist with a <f:debug> on the image reference but I can not access it without an error or getting an empty string.

I used following code to get the data from the FAL:

$fileRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');
$files = $fileRepository->findByRelation('tx_photographphotographygalerie_domain_model_galerie', 'image', $galerie->getUid());

And get following data back (<f:debug> of array named image):

When I now acess the data in the frontend with following code:

{image.imageReference.originalFile.metaDataProperties.title}

It get the error: "Cannot access protected property TYPO3\CMS\Core\Resource\File::$metaDataProperties"

I also testet to get the discription with FileReference->getDescription() and FileReference->getProperties(), but I get only a empty string back.


Files

TYPO3_Bug_FAL.JPG (142 KB) TYPO3_Bug_FAL.JPG Markus Gehrig, 2017-11-11 21:21
Actions #1

Updated by Markus Gehrig about 7 years ago

  • Description updated (diff)
Actions #2

Updated by Markus Gehrig about 7 years ago

  • Description updated (diff)
Actions #3

Updated by Frans Saris about 7 years ago

  • Status changed from New to Closed

The properties are merged together into properties.

So use
{image.imageReference.originalFile.properties.title}

<f:debug>{image.imageReference.originalFile.properties}</f:debug>

Actions

Also available in: Atom PDF