You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce
Using a FileReference Object as src parameter leads to an error: Invalid file src provided, must be either a uid, combined identifier, path/filename or implement FileInterface. ERROR: 1536560752
in ConversionService. The src parameter is handled there just for FileInterface and source path.
Expected behavior
Using the image referenced by FileReference like written in the docs: This ViewHelper renders an image given as src. As src argument you may provide a valid TYPO3 path or an object implementing TYPO3 FAL FileInterface (e.g. File or FileReference).
Or I have not understood something correctly.
Possible solution
Extend function convertFileSrcToFileObject like this - not fully tested
@thorstenBorn-cosmoblonde Thanks for this very nice bug report! I agree, the docs are not specific enough, unfortunately there are two FileReference classes:
TYPO3\CMS\Extbase\Domain\Model\FileReference -> does not implement FileInterface
However I think it would be a nice addition to seamlessly support Extbase FileReference, so I will add support for it. In the meantime you could easily workaround this by passing the originalResource, which already implements the FileInterface, to the image ViewHelper. We are doing this in the template shipped for EXT:news, please see:
Describe the bug
Using a FileReference object as src parameter leads to an error.
Environment
TYPO3 version(s): v11.5.16
pdfviewhelpers version: v2.4.1
Steps to reproduce
Using a FileReference Object as src parameter leads to an error:
Invalid file src provided, must be either a uid, combined identifier, path/filename or implement FileInterface. ERROR: 1536560752
in ConversionService. The src parameter is handled there just for FileInterface and source path.
Expected behavior
Using the image referenced by FileReference like written in the docs:
This ViewHelper renders an image given as src. As src argument you may provide a valid TYPO3 path or an object implementing TYPO3 FAL FileInterface (e.g. File or FileReference).
Or I have not understood something correctly.
Possible solution
Extend function convertFileSrcToFileObject like this - not fully tested
The text was updated successfully, but these errors were encountered: