-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video (local) is not displayed if it is in a symlink folder #7313
Comments
@ufeldmann so the file |
@fritzmg yes it is set to public, all other types of files, such as images or downloads, work. |
Not sure why it wouldn't work just for videos. Either all or no files should be accessible. Can you post a link to an example? |
To clarify: the video element does not even render, even though a valid video from a public folder was selected. |
Probably related, but the video element does not use the FigureBuilder AFAIK, so the source of the issue must be different I guess. Probably needs to be debugged here: contao/core-bundle/src/Controller/ContentElement/PlayerController.php Lines 193 to 195 in 5f54aa7
|
I can confirm the issue. And yes, contao/core-bundle/src/Filesystem/PublicUri/SymlinkedLocalFilesProvider.php Lines 35 to 37 in 6eb2823
Because
(the symlink target in my case) and
I do not know how to fix this though as I am unsure how this is intended to work. |
Maybe as described in #5869 (comment) ? |
Hm, I still don't quite understand why we need all this complexity. If I remove |
Maybe I can clarify how things are intended to work. There are two pieces, that are relevant.
IMHO the correct solution to getting contao/core-bundle/src/Filesystem/PublicUri/SymlinkedLocalFilesProvider.php Lines 35 to 37 in 5c3053f
We could do something like this:
|
But in what way does Flysystem not support symlinks? The whole point of symlinks is to map directories or files to different physical locations seamlessly - and that seems to work with Flysystem too. After all why would Flysystem care whether something in its relative path is actually a Symlink to somewhere else? Furthermore if you use the |
I don't know what you mean? It does not work with filesystem (at least for me). The local adapter does not follow links which is a design decision according to the issues I linked to from the flysystem repo (see above). You could create your own adapter, that worked differently but you would probably run into the outlined issues. IMHO we already have a workaround, that we just need to tweak a little bit. |
There is an issue that showed that they actually do not work with Contao and flysystem: #4277 |
See #7319. |
How exactly did you test? May be it is OS dependent somehow? |
https://github.com/thephpleague/flysystem/blob/3.x/src/Local/LocalFilesystemAdapter.php#L217-L222 - and our configuration of local adapter is already to ignore/skip, rather than throw. |
…links (see #7319) Description ----------- Fixes #7313. This implements the changes as outlined in #7313 (comment). @ufeldmann Can you check if this solves your problem? Commits ------- af2d30d support multiple adapters in the SymlinkedLocalFilesProvider 4156aa2 also configure SymlinkedLocalFilesProvider for automatically added ad… 3a0283b adjust tests 3825cde move local filesystem adapter from dev to regular dependencies ee49e75 use a weak map instead of manually calling spl_object_Hash
…links (see #7319) Description ----------- Fixes #7313. This implements the changes as outlined in contao/contao#7313 (comment). @ufeldmann Can you check if this solves your problem? Commits ------- af2d30da support multiple adapters in the SymlinkedLocalFilesProvider 4156aa2f also configure SymlinkedLocalFilesProvider for automatically added ad… 3a0283b1 adjust tests 3825cde5 move local filesystem adapter from dev to regular dependencies ee49e750 use a weak map instead of manually calling spl_object_Hash
I see, so it only affects listing folder content. That's even more arbitrary 🙄. That's why singular images or video files are not affected by this and work out of symlinked directories normally. |
Affected version(s)
5.3.10
Description
I have a problem with the integration of local videos in our deployment structure.
We are symlinking a
content
folder in thefiles
folder so that it persists across releases.Our structure is the following:
current
(symlink to the current release in the releases folder, the document root iscurrent/public
)releases
(folder with the individual releases)shared/files/content
(folder with the files. In the release folder a symlink is created fromfiles/content
to this folder)If I upload a video in the
files/content
folder it is available in Contao.Then I use the “Video/Audio” content element and embed the video there, it will also be displayed to me when editing the content element, but in the backend list, where the preview is already rendered, it will not displayed.
The entire element is not rendered in the frontend on the website.
If I create a new folder in
files
directly in the release that is not a symlink, then it works perfectly.So it must be due to the symlink logic (maybe symlink to symlink).
In 5.3.9 we also had problems with images in the symlinks, but that is fixed in 5.3.10.
Maybe this also has something to do with.
Thanks for all your hard work!
The text was updated successfully, but these errors were encountered: