Task #53772

Epic #55070: Workpackages

Epic #54260: WP: FAL Missing Issues / Features / API

Story #54261: As an Extension-Developer I want to use FAL assets in my custom development

MetaData updated during runtime is not updated in the FileObject Instance

Added by Markus Klein over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2013-11-19
Priority:Must have Due date:2013-12-31
Assigned To:Steffen Ritter % Done:

100%

Category:File Abstraction Layer (FAL) Spent time: 2.00 hours
Target version:6.2.0 Estimated time:3.50 hours
TYPO3 Version:6.2 Complexity:hard
PHP Version: Sprint Focus:

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"/>

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.

Associated revisions

Revision d4b2d215
Added by Steffen Ritter over 1 year ago

[BUGFIX] Indexer does not update the FileObjects

If the Indexer updates metadata during runtimer (after a file object)
has been created, the file object itself is not updated.

This leads to possible errors with image rendering, if files are to be
shown which have not been indexed before.

Releases: 6.2
Resolves: #53772
Change-Id: I70be5ebefe1e00e903694a576847fa8fba167461
Reviewed-on: https://review.typo3.org/27690
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

History

#1 Updated by Steffen Ritter over 1 year ago

  • Target version changed from next-patchlevel to 6.2.0

#2 Updated by Steffen Ritter over 1 year ago

  • Subject changed from FAL does not populate meta data into File objects to MetaData updated during runtime is not updated in the FileObject Instance
  • Status changed from Accepted to Needs Feedback

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 is the interesting part.

#3 Updated by Steffen Ritter over 1 year ago

  • Status changed from Needs Feedback to Accepted

#4 Updated by Steffen Ritter over 1 year ago

  • Due date set to 2013-12-31
  • Estimated time set to 3.50

#5 Updated by Steffen Ritter over 1 year ago

  • Parent task set to #54261

#6 Updated by Steffen Ritter over 1 year ago

  • % Done changed from 0 to 70

#7 Updated by Steffen Ritter over 1 year ago

  • Status changed from Accepted to Resolved
  • % Done changed from 70 to 100

Also available in: Atom PDF