User tests: Successful: Unsuccessful:
Pull Request for Issue #34358 .
Changed the way directory settings are obtained in the FileSystem - Local
plugin. If mo directory has been explicitly chosen yet, return Media Manager's 'Path to 'Path to Files Folder' setting.
Make sure you have a fresh Joomla! 4.0 installation, or at least one with an unaltered FileSystem - Local
plugin configuration.
Change both path's of the Media Manager configuration, i.e. 'Path to Files Folder' and 'Path to Images Folder'.
Open Media Manager.
Beware of caching when fiddling with the Media Manager and its path settings! (see also #34239)
The result depends on proper configuration of the FileSystem - Local plugin. If no directory is chosen, which is the default, the plugin returns [{"directory": "images"}] and the Media Manager shows nothing.
A list of files in folder 'Path to Files Folder', if there are any, or an empty folder otherwise.
It's probably a good thing to document this somewhere, preventing (new) users to get confused.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Labels |
Added:
?
|
If mo directory has been explicitly chosen yet, return Media Manager's 'Path to 'Path to Files Folder' setting.
I am doubt here, the plugin should use own options. There may be another filesystem plugins.
If I understand it correctly:
Local
plugin supports local files.So I think it makes sense to use Media Manager's path setting as a default for the Local
plugin,
If no directory is chosen, which is the default, the plugin returns [{"directory": "images"}] and the Media Manager shows nothing.
I not checked how it connected, but probably the folder should come from filesystem plugins only.
I did check. After changing paths in the Media Manager, it did not work anymore until I selected the proper directory in the Local
plugin.
The path option in the new Media Manager configuration seems does not make sense anymore.
That may well be, but it is there and can be used. As long as that's the case, I think it must behave in a predictable manner.
If I understand it correctly:
The Local plugin supports local files.
The Media Manager also supports local files.
The thing that Media Manager supports depend from enabled FileSystem plugins.
On its own it does not support anything.
I agree with @Fedik . You can install a filesystem plugin e.g. for using Dropbox, and then you can set paths to files and images folders in the media manager options. With the change which is suggested here, the local filesystem plug-in would use the path to a folder on Dropbox as directory, and that would be wrong.
@Fedik @richard67 I'm not sure I understand. Is it possible to have multiple active filesystem plugins? If so, how does the Media Manager distinguish between them, i.e. know which one to use?
@pjdevries Yes, the media manager can use multiple different filesystems. Each one is a base folder in the media manager. See the testing instructions in this PR: #33724 . In media manager you see 2 parent folders where you can navigate to children, the local "Images" and the "Dropbox" folder when doing as described in that PR.
P.S.: Same when e.g. inserting an image into an article: You can use images from the local filesystem as well as from Dropbox when using that dropbox plugin (which is not ready yet and was developed just for testing, but I'm sure sooner or later you will find more such plugins in the extensions directoy).
I think we need to consider removing file_path
and image_path
from Media config.
I do not see a reason why we need them, but I may be wrong.
I think we need to consider removing
file_path
andimage_path
from Media config.
I do not see a reason why we need them, but I may be wrong.
From what I understand from @richard67's explanation, I think you are right. If Media Manager no longer uses those paths but only the adapter settings, the issue that resulted in this PR vanishes automatically. A default return value of 'images' from the Local
filesystem plugin, also makes sense then, making this PR unnecessary and @brianteeman a happy dude :)
Seemed like a good idea to play a bit with multiple adapters, but I get this known error: 'Call to undefined method GuzzleHttp\Utils::chooseHandler()'.
@pjdevries That's an issue with that plugin which was a quick made thing just for testing. You can find the solution here: #33724 (comment)
That's an issue with that plugin which was a quick made thing just for testing. You can find the solution here: #33724 (comment)
Yes, works! Cool!
Labels |
Added:
?
Removed: ? |
I am doubt here, the plugin should use own options. There may be another filesystem plugins.
I not checked how it connected, but probably the folder should come from filesystem plugins only.
The path option in the new Media Manager configuration seems does not make sense anymore.