File browser did not see virtual directory

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
6/18/2012 3:18:30 AM
Gravatar
Total Posts 8

File browser did not see virtual directory

Hello,

to create a multi-language Mojo site is quite difficult. I understand that I must create a new site with new pages for every language. To avoid me to uploaded the graphics for each site several times, I've created common media directory for the sites like Joe described at this forum topic.

In IIS Manager the virtual media directory is shown correct under each site. Also the already used media files are shown correct at the pages. But when I edit a page and try to select a picture, the file browser did not show the (virtual) media directory.

Should I need restart anything or did I forget an configuration entry?

Thanks for your help..

Jürgen

6/21/2012 2:47:56 AM
Gravatar
Total Posts 8

Re: File browser did not see virtual directory

Hello,
I would again ask gently if I have failed to fulfill a netiquette or my question is so absurd or I have described it so complicated?

The problem is a bit urgent, because the translators want to start.

Can anybody give me a tip? 

6/21/2012 11:39:03 AM
Gravatar
Total Posts 18439

Re: File browser did not see virtual directory

It should work. If it doesn't work I can only think of a few things that might be factors. Make sure that it is just a virtual directory not an application in IIS. If you are using a network share rather than a local folder you may need to google for information how to make that work, permissions could also be a factor.

Hope that helps,

Joe

6/22/2012 5:18:20 AM
Gravatar
Total Posts 8

Re: File browser did not see virtual directory

I Check again. Directory is virtual and not an IIS application. Rights are the same like the original Media dir. Ist equal which filemanager in mojo I use. None of them shows the virtual directory.
6/22/2012 7:27:30 AM
Gravatar
Total Posts 18439

Re: File browser did not see virtual directory

Hi,

The problem is the System.IO methods like DirectoryInfo.GetDirectories does not see virtual directories. So the only way it can work is with an expected path so we can tell it the expected virtual path that maps to the virtual directory, specifically it can work if you copy the /media folder to a commoi\n location, then remove the previous media folder then create a virtual directory at /Data/Sites/[SiteID]/media (ie create a virtual directory named media below the real folder /Data/Sites/[SiteID] 

Then it also must be configured so that admin users can only access the file system starting at that point by adding this in user.config:

<add key="ForceAdminsToUseMediaFolder" value="true" />

This is because if we start at a higher level it won't see the media folder as a child folder since it is now virtual, but if we start at the media folder it can see the files and folders below it.

It isn't going to work using arbitrary virtual folders.

Hope that helps,

Joe

6/22/2012 12:09:38 PM
Gravatar
Total Posts 8

Re: File browser did not see virtual directory

The described procedure was exactly your previous suggestion:

"If your sites use the same images and you have control of the server, a workaround would be to create folder /Data/commonmedia

Then copy all the files and folders from /Data/Sites/[SiteID]/media into the commonmedia folder. Then delete the media folder from each site under /Data/Sites/[SiteID]/

Then create an IIS virtual directory for each site at /Data/Sites/[SiteID]/media and make each virtual directory point to the /Data/commonmedia folder

That way all the sites have a media folder but they all really point to the same physical folder."

Right? 

 

So I did exactly. I think the reason was somewhere in the permissions. On monday I would talk with my admin, specifically about 'Pass-Through-Authentification... 

The entry '<add key="ForceAdminsToUseMediaFolder" value="true" />' does indeed provide that the directory is finally displayed, but even still this. I did not see the others and could not select any files for links and so. So this is not a good idea.

At the moment I really think about to use SyncBack to sync the both directories...

6/30/2012 3:20:47 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: File browser did not see virtual directory

I've only read this quickly, but if the IIS virtual directory method is not working, perhaps you could use a symbolic link to create virtual media folders in your various sites that all point to the one real folder.

In a command window cd to the folder where you want the virtual "media" folder, and use something like

mklink /D media d:\my_other_path\media

I've not actually tried this in a mojoPortal installation, but maybe it will give you a solution.

You must sign in to post in the forums. This thread is closed to new posts.