Issue Task Closed

#53772MetaData updated during runtime is not updated in the FileObject Instance

Markus Klein 11/19/13, 21:57 updated 10/23/17, 21:46

Description

If using the image viewhelper, which now uses FAL API directly, the returned File object does not have a width and height.

Example:
<f:image src="../some/what/ever/path/to/file.png" alt="This will have empty width and height attributes"></f:image>

Stacktrace:
  • ImageViewHelper:103 $image = $this->imageService->getImage($src, $image, $treatIdAsReference);
  • …
  • ImageService:139 $image = $this->resourceFactory->retrieveFileOrFolderObject($src);
  • …
  • ResourceFactory:389 $fileObject = $this->getIndexer($storage)->createIndexEntry($fileIdentifier);
  • Indexer:70 $this->extractRequiredMetaData($fileObject);
  • Indexer:218 $this->getMetaDataRepository()->update($fileObject->getUid(), $metaData);

The $metaData does properly contain width/height and things get written to DB here, but the actual $fileObject, which will be returned by retrieveFileOrFolderObject() afterwards is never updated with the additional meta data.

This can be tested with the Language module, if you revert https://review.typo3.org/25516 locally. The extension icons have empty(!) width and height attributes.

Reviews 1