Revolution: Media manager sometimes uploads files to the wrong folder

Created on 17 Feb 2019  Â·  11Comments  Â·  Source: modxcms/revolution

Bug report

Summary

The media manager doesn't always upload files to the expected folder.

Step to reproduce

  1. Set up a TV (file or image) and link it to a specic media source. In that media source, create folders (like "images/newsletter/" for example).
  2. In a resource that uses that TV, link the TV to a file INSIDE a subfolder. Save the resource.
  3. Edit a different resource, then go back to the original resource.
  4. Edit the TV. In the middle pane, the media browser will show the files inside the folder corresponding to the TV setting you saved.
  5. Click the upload button in the upper left of the media browser and upload a file.

Observed behavior

Following the steps above, the file will be uploaded into the ROOT folder of the media source, NOT the folder whose contents are displayed in the main panel.

Expected behavior

As it is now, a folder on the left has to be clicked on first, before clicking the upload button, to make files go into that folder. When the media browser first opens, if the contents of a subfolder are displayed in the main panel, that folder should ALSO be selected in the left list of folders/files. Otherwise, even though a folder is not selected on the left, users think that uploading a file will go into the folder that is being viewed in the main panel.

Environment

All versions of MODX.

bug area-core

All 11 comments

Put another way, when opening the media browser from a TV field that has a file entered, make the media browser tree have the folder containing that file selected.

Thanks for adding additional information!

Any update on this? I continually have to educate new clients about this bug in the media manager so they can upload files where they want them to go.

Any update?

Sorry, I don’t have any update on this. My time is also a bit limited due to my baby girl being born!

Maybe @Ruslan-Aleev is able to help fix this?

Sorry, but I have no time and no opportunity.

Maybe @Jako is able to help fix this? :)

Sorry, I don’t have any update on this. My time is also a bit limited due to my baby girl being born!

Hey, that's exciting! Congrats!

Any update?

@rainbowtiger You can replace this line https://github.com/modxcms/revolution/blob/2.x/manager/assets/modext/widgets/system/modx.tree.directory.js#L725
with:
var path = this.config.openTo || this.config.rootId || '/';
Then the path will be saved.

I haven't figured out how to add select class to the directory on the left yet.

Thanks — that fixes uploading to the wrong place. Highlighting the folder on the left would also be great, but at least this will fix the main problem for clients.

Fixed #15227

@modxbot close

Was this page helpful?
0 / 5 - 0 ratings