Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ben McKean 272 posts 549 karma points
    Nov 08, 2010 @ 11:21
    Ben McKean
    0

    Virtual Directories 4.5.2

    Hi,

    Please can somebody confirm that Virtual Directories work succesfully in 4.5.2?

    I've searched and seen a couple of posts saying of things not working correctly but nobody saying all is working fine.

    The reason I ask is I'm just about to start a commercial project that will use virtual directories (if possible) so need to know which route to take.

    Thanks

    Ben

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Nov 08, 2010 @ 12:21
    Aaron Powell
    0

    You can run Umbraco in a virtual directory in 4.5.x, I've worked on a site with it.

    You've always been able to run other apps in a virtual directory under Umbraco, you just have to ensure that the web.config in the 'sub applications' remove the Umbraco HttpModules.

  • Ben McKean 272 posts 549 karma points
    Nov 08, 2010 @ 12:48
    Ben McKean
    0

    Thanks for the reply slace.

    I've got it up and running however I'm experiencing a problem when rendering media items. Do you know if there is any other setting that needs amending?

    Basically when I insert an image into the Rich Text Editor it saves the file in the correct folder e.g. "/virtualdirectory/media/1/image.gif". However as soon as I click 'Save and publish' and then view the webpage the path changes to "/media/1/image.gif" when rendered which doesn't exist.

    Is this a bug?

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Nov 08, 2010 @ 13:13
    Aaron Powell
    0

    Looks like this is a known issue: http://umbraco.codeplex.com/workitem/29196

  • Ben McKean 272 posts 549 karma points
    Nov 08, 2010 @ 15:50
    Ben McKean
    0

    Ok, looks like a few people have reported it but it hasn't been fixed yet. I wouldn't mind having a go at fixing it myself. Can you please point me in the direction of where to download the source for 4.5.2?

    Thanks.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Nov 08, 2010 @ 21:51
    Aaron Powell
    0

    http://umbraco.codeplex.com/SourceControl/list/changesets

    $/branches/4.1 is the latest source (ie - what'll become 4.6)

  • Wes 14 posts 35 karma points
    Jan 03, 2011 @ 23:03
    Wes
    0

    Ben, did you ever fix this yourself, or manage to find a way to work around it?

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 03, 2011 @ 23:16
    Aaron Powell
    0

    I'm pretty sure the bug is fixed in Juno

  • Wes 14 posts 35 karma points
    Jan 03, 2011 @ 23:38
    Wes
    0

    Cool. I'll check it out.

  • Wes 14 posts 35 karma points
    Jan 05, 2011 @ 17:47
    Wes
    0

    For those reading this thread, this bug is actually not fixed in Juno, at least not in the 4.6 beta based on my test yesterday. As with 4.5.2 release, you can insert an image just fine, the preview is there, the HTML shows the virtual directory, and when you publish, the virtual directory is removed from the path, and the image breaks.

    It is a known issue; just wish it would get fixed, as it appears (so far, anyway) to be the main stumbling block to actually using Umbraco in a virtual directory.

    It's also worth noting that using the umbracoMediaPath setting as suggested here http://our.umbraco.org/wiki/reference/webconfig/additional-umbraco-specific-appsettings doesn't seem to have any effect on this whatever. In fact, it doesn't appear to do anything at all; perhaps I'm not doing it correctly.

  • mots 44 posts 75 karma points
    Feb 10, 2011 @ 18:57
    mots
    0

    I've also experienced the umbracoMediaPath setting not doing anything. Anyone else experienced this?

  • Javier Barrera 34 posts 85 karma points
    Feb 23, 2011 @ 06:35
    Javier Barrera
    0

    I did set the umbracoMediaPath key in the web.config. After looking at the soure code I realized that you need to actually delete the file you uploaded in the Media section and re-upload the file, as that is how it saves. Its a huge pain, but good to know if you have a new site.

    Once I added the key, deleted my old media file, and re-created it, I noticed that it pointed to the directory I specified. So if you're running in the virtual directory "/myvirdir/" then your umbracoMediaPath key value needs to be "/myvirdir/media"

    Keep in mind that if you ever move to the root directory, or change virtual directories, you'll need to either re-create the media items or run some SQL to fix the path directly in the cmsContentXml table in the database.

     

  • mots 44 posts 75 karma points
    Mar 01, 2011 @ 10:46
    mots
    0

    Is it possible to get the media path to a location directly on disk, rather than a location somewhere within the website? For example a location on your computer's C drive "C:\MyMediaFolder\".

  • Javier Barrera 34 posts 85 karma points
    Mar 02, 2011 @ 01:14
    Javier Barrera
    0

    @mots

    You won't be able to do that unless you edit the Umbraco source and also create some sort of control to get private files and stream them via a public interface. If the media files are on a private section on the server, then they won't be accessible to the public.

Please Sign in or register to post replies

Write your reply to:

Draft