This project is read-only.

Problem with editing media folders in tenants

Topics: Core, General, Troubleshooting
Apr 15, 2012 at 10:36 PM
Edited Apr 15, 2012 at 10:39 PM

I've just ran into a weird issue. When I'm logged in to one of the tenant sites in multi-tenancy environment, editing Media folders does not work as it supposed to.

When I go to Media, everything's fine - the existing folders are listed correctly. When I try clicking on any folder, it goes to correct URL (Admin/Media/Edit?name=folderName&mediaPath=folderName) but it's still displaying the initial list of folders, instead of the contents of the chosen one. Just like if nothing has happened. 

It does not happen for the Default tenant, only for other ones.

Anybody ran into this too?

EDIT: I'm working with the latest source code, as usual:)

Apr 16, 2012 at 1:27 AM

Tracked it down - for some reason the Model.MediaPath property inside /Modules/Orchard.Media/Views/Admin/Edit.cshtml is always empty, no matter which folder you choose to edit. When it is empty, the storage provider always returns the list of folders at a given tenant's root, so the behavior is ok.

It's kinda weird, as mediaPath property exists within query string, but for some reason it doesn't get mapped to the action parameter. Smells like a bug.