User tests: Successful: Unsuccessful:
Makes no sense to let choose core folders (except images
) to contain media files.
Display the filesystem local plugin after creating a custom root folder
We could also add recursing as proposed and closed here: #29719 as this limits drastically the number of sub folders to fetch, preventing overload.
If we do, we would get:
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I quite like this but came across a snag. I created a root folder named imagesforme and added it. I removed images from the list. Then go to media. The imagesforme folder shows it has a sampledata sub-folder. And clicking on it in Media results in an Error: File or Folder not found message. Restoring images and selecting either the word images or the word imagesforme restores normal behaviour. Looks the currently selected folder is hanging around after access to it has been removed.
@ceford
I am afraid this is unrelated to this PR. I explain.
Before this PR, one can choose for example cli
or language
as a repository for media files, which makes no sense at all. Whether there is or not a sub folder with media files or not has no impact on this PR.
After the application of PR the management of the plugin menu is different and function.
In the media component instead, if I go to create a folder I don't see it as in the image you inserted. The custom folder is generated under the images folder.
Interesting. Will test asap. It is possible indeed that com_media Options still play a role. Which means that the plugin is not fully replacing them...
In my test above I had created the sub folder manually.
I'd lost PR.
I took it back, I redo a test and when I create a folder in the media, I don't see it in the FileSystem plugin. In the plugin there is only the images folder.
Did you create the folder by Joomla! or by FTP?
In the media component you should have access to the images root and have the possibility to choose where to create the new folder.
The way I think about it I would not give this possibility in the component for security / protection of the whole site.
@infograf768 if I don't get the PR focus, tell me.
I'd lost PR.
I took it back, I redo a test and when I create a folder in the media, I don't see it in the FileSystem plugin. In the plugin there is only the images folder.
Did you create the folder by Joomla! or by FTP?
In the media component you should have access to the images root and have the possibility to choose where to create the new folder.
@infograf768 if I don't get the PR focus, tell me.
The way I think about it I would not give this possibility in the component for security / protection of the whole site.
I have tested this item
It certainly does limit it. There is the question of if it should as @brianteeman commented but the pr does as its designed to
It certainly does limit it. There is the question of if it should as @brianteeman commented but the pr does as its designed to
I have tested this item
This definitely makes sense in certain cases - as for example we block all direct access to the libraries folder in J4 https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/.htaccess (an extension from j3 when it was just composer files). I think maybe media might be a valid directory too. I've seen some people use media manager to edit extension media in there. Other than that I believe this is probably fine
I think folders (like build, installation,...) that only exists in the git version of joomla can be removed from the exclude list.
agree with @HLeithner about non distributed folders
but I still dont see why the user cannot add any folders that they want to add. It is a filesystem plugin after all. Extensions can and have always put media wherever they like.
I would set the exclude list to:
administrator|api|cache|cli|components|includes|language|layouts|libraries|modules|plugins|templates|tmp
And add all subfolders.
Normally we should prevent any direct access to any of these folders anyway (maybe except some of them).
Media folder would be useful to allow an extension to add it's own folder to the media manager.
Why exclude templates? We already provide access through template manager
Why exclude templates? We already provide access through template manager
Thats limited to SU only right?
Thats limited to SU only right?
SU & Administrator have access to the plugin and can modify.
Any author and up have access to all the folders defined when inserting image in article.
Adding recursive true takes long to load in backend.
Modifying to the list defined in #29721 (comment) gives access to all folders in media/ if recursive is set to true.
If we do that, we let authors and up figure out what extensions are used by the site. Don't know if it is a good idea.
Should be OK now.
| is a bad path separator anyway, you can decide between : for posix or ; for windows as path separator everyhting else is wrong.
I would suggest : (posix variant) since I think we will not ship (hopefully) a directory with a : in it it's name
oh that's a regex then forget what I said
The regex is still wrong tough.
I have tested this item
I have tested this item
This pull request has automatically rebased to 4.2-dev.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-06-28 07:36:46 |
Closed_By | ⇒ | infograf768 | |
Labels |
Added:
Conflicting Files
?
Removed: ? |
I understand this issue is closed. I would like to ask a question: was the intention to allow or disallow "custom" folders to be included?
J! 4.2.3: I can't see how to specify one's own folder to add to the list. I'm not explaining this well, sorry. Suppose one wanted to add "media/templates/site/cassiopeia/images" to the list, how would one go about doing that?
@sozzled Have you enabled the FileSystem - Local plugin?
Yes. I'm just asking if one can define a specific sub-folder as the "root" (for want of a better term) ... is it possible or not?
you can only select root level folders
Thanks, @brianteeman. You've answered my question.
I don't agree with that assumption