Issue Bug Closed

#82977FAL: Metainformation of filelist not accessable

Markus Gehrig 11/11/17, 21:42 updated 11/11/17, 22:29

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.</f:debug>

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):<br><img alt src="https://forge.typo3.org/attachments/download/32887/TYPO3_Bug_FAL.JPG"></f:debug>

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.