Unknown Variable $file in FileTitleViewHelper and FileDescriptionViewHelper
Hi,
in both viewHelpers, $file is used in render method but never declared. Easiest fix would be to add as first line
$file = $this->arguments['file'];
That bug is present from at least version 2.0.2 on, I guess it happened when moving the argument from render parameter to initializeArguments.
Currently no description nor title are displayed, which might be crucial for copy rights and such.
Comments (9)
-
repo owner -
repo owner Related to/duplicate of
#53? -
reporter Hi Frans, it is related but a different issue. I will provide a PR for this one
-
reporter @Frans Saris I think I cannot create a PR for your repository, please check this commit: https://bitbucket.org/Lumrenion/fs_media_gallery/commits/9a8eec7ad4d20f62020fcb68c4c9e91c1ac0c437
Sorry, I am not so familiar with butbucket, I liked it when this extension was at github
Explanation to the removed code:
Checking for $file being instanceof FileInterface is not required here as it is done automatically from the internal ViewHelper stuff, when the ViewHelper argument is assigned.
FileReference can overwrite the properties of File when checking the checkbox in the TYPO3 backend. FileReference then merges the properties of it’s original File. Also FileReference does not have this method, I think it comes from Extbase’s FileReference or so.
-
repo owner Add variable $file (see
#56)→ <<cset 8cfa549fd65e>>
-
repo owner Merged in nebrot42/fs_media_gallery-2/nebrot/add-variable-file-see-56-1560857699205 (pull request #31)
Add variable $file (see
#56)→ <<cset 7018af3d2569>>
-
repo owner Add variable $file (see
#56)→ <<cset 3c11d7521f61>>
-
repo owner Merged in nebrot42/fs_media_gallery-1/nebrot/add-variable-file-see-56-1560856713382 (pull request #30)
Add variable $file (see
#56)→ <<cset 9206d60d8b47>>
-
repo owner - changed status to resolved
fixed with 0422f4dceff56578453780f085dbe4b029db2529
- Log in to comment
Could you provide a pull request to fix this?
That would be great