FileTitleViewHelper
This viewhelper knows one argument, i.e. "file". This can be a FileReference object (from Partials/MediaAsset/Detail.html or the argument can be a File object, f.i. from Partials/MediaAlbum/FlatList/AssetsList.html
The result is of course an error on wrong objecttype. I'm using version 2.0.1
Comments (9)
-
-
I can confirm this, currently it is not possible to set a fixed intro image. The
registerArgument
method does not allow a notation like ClassA|ClassB, so I think the only solution is to set the allowed type as ‘mixed’ and later check the types in render methodEdit:
Exakt Error message:
The argument "file" was registered with type "TYPO3\CMS\Core\Resource\File", but is of type "TYPO3\CMS\Core\Resource\FileReference" in view helper "MiniFranske\FsMediaGallery\ViewHelpers\FileTitleViewHelper".
Both classes implement
TYPO3\CMS\Core\Resource\FileInterface
. That would be a better alternative to ‘mixed’. -
Issue will be fixed here: https://bitbucket.org/franssaris/fs_media_gallery/issues/56/unknown-variable-file-in, as soon as I managed to create a PR
-
@Philipp Seßner I just pushed the PR https://bitbucket.org/franssaris/fs_media_gallery/pull-requests/29/bugfix-fixed-argument-type-in/diff, since we had the same issue.
-
@Torben Hansen That’s great. Could you also commit my changes in render method? https://bitbucket.org/Lumrenion/fs_media_gallery/commits/9a8eec7ad4d20f62020fcb68c4c9e91c1ac0c437
When I try to create a pull request in this repository, Bitbucket gives me an “Access denied”.
-
@Philipp Seßner I can not access your repository and get “Access denied”. Maybe there is something wrong with the access settings of your repository and therefore no PR is possible.
-
@Torben Hansen Ah, the repository was marked private. I fixed that, you should be able to access it now!
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
We can confirm this behavior on 9.5.5 php 7.2 to.