Conflicting Files ? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
20 Jun 2020

Summary of Changes

Makes no sense to let choose core folders (except images) to contain media files.

Testing Instructions

Display the filesystem local plugin after creating a custom root folder

Before patch

Screen Shot 2020-06-20 at 11 09 46

After patch

Screen Shot 2020-06-20 at 11 11 38

Therefore if we do this
Screen Shot 2020-06-20 at 11 14 26

we will get this
Screen Shot 2020-06-20 at 11 13 58

NOTE:

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:

Screen Shot 2020-06-20 at 08 06 48

avatar infograf768 infograf768 - open - 20 Jun 2020
avatar infograf768 infograf768 - change - 20 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jun 2020
Category Front End Plugins
avatar infograf768 infograf768 - change - 20 Jun 2020
The description was changed
avatar infograf768 infograf768 - edited - 20 Jun 2020
avatar brianteeman
brianteeman - comment - 20 Jun 2020

Makes no sense to let choose core folders (except images) to contain media files.

I don't agree with that assumption

avatar ceford
ceford - comment - 20 Jun 2020

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar infograf768
infograf768 - comment - 21 Jun 2020

@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.

avatar adj9
adj9 - comment - 25 Jun 2020

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar infograf768
infograf768 - comment - 25 Jun 2020

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.

avatar adj9
adj9 - comment - 4 Jul 2020

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.
avatar adj9
adj9 - comment - 4 Jul 2020

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar opn365 opn365 - test_item - 17 Oct 2020 - Tested successfully
avatar opn365
opn365 - comment - 17 Oct 2020

I have tested this item successfully on bc1eceb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar softforge
softforge - comment - 17 Oct 2020

It certainly does limit it. There is the question of if it should as @brianteeman commented but the pr does as its designed to


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar softforge
softforge - comment - 17 Oct 2020

It certainly does limit it. There is the question of if it should as @brianteeman commented but the pr does as its designed to


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar softforge softforge - test_item - 17 Oct 2020 - Tested successfully
avatar softforge
softforge - comment - 17 Oct 2020

I have tested this item successfully on bc1eceb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar wilsonge
wilsonge - comment - 17 Oct 2020

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

avatar HLeithner
HLeithner - comment - 17 Oct 2020

I think folders (like build, installation,...) that only exists in the git version of joomla can be removed from the exclude list.

avatar brianteeman
brianteeman - comment - 17 Oct 2020

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.

avatar HLeithner
HLeithner - comment - 17 Oct 2020

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.

avatar brianteeman
brianteeman - comment - 17 Oct 2020

Why exclude templates? We already provide access through template manager

avatar zero-24
zero-24 - comment - 17 Oct 2020

Why exclude templates? We already provide access through template manager

Thats limited to SU only right?

avatar infograf768
infograf768 - comment - 20 Oct 2020

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.

avatar infograf768
infograf768 - comment - 22 Oct 2020

Should be OK now.

avatar HLeithner
HLeithner - comment - 22 Oct 2020

| 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

avatar HLeithner
HLeithner - comment - 22 Oct 2020

oh that's a regex then forget what I said

avatar SharkyKZ
SharkyKZ - comment - 22 Oct 2020

The regex is still wrong tough.

avatar vijaykhollam vijaykhollam - test_item - 7 Nov 2020 - Tested successfully
avatar vijaykhollam
vijaykhollam - comment - 7 Nov 2020

I have tested this item successfully on 6a2a043


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar Kaustubharas Kaustubharas - test_item - 7 Nov 2020 - Tested successfully
avatar Kaustubharas
Kaustubharas - comment - 7 Nov 2020

I have tested this item successfully on 6a2a043


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar infograf768 infograf768 - change - 28 Jun 2022
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: ?
avatar infograf768 infograf768 - close - 28 Jun 2022
avatar sozzled
sozzled - comment - 16 Oct 2022

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?

avatar ceford
ceford - comment - 16 Oct 2022

@sozzled Have you enabled the FileSystem - Local plugin?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29721.

avatar sozzled
sozzled - comment - 16 Oct 2022

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?

avatar brianteeman
brianteeman - comment - 16 Oct 2022

you can only select root level folders

avatar sozzled
sozzled - comment - 16 Oct 2022

Thanks, @brianteeman. You've answered my question. ?

Add a Comment

Login with GitHub to post a comment