This project is read-only.

MediaPicker validation error with Media Folder Orchard 1.5

Oct 22, 2012 at 4:44 PM

Having embarked on a load balanced setup using Orchard 1.5 and IIS 8 requiring a UNC path to the Media folder, I came across a small issue with the validation of the media picker in MediaPickerFieldDriver.cs at:

if (!String.IsNullOrWhiteSpace(field.Url) && !_webSiteFolder.FileExists(field.Url)) {updater.AddModelError("Url", T("The media in {0} could not be found", feld.Name.CamelFriendly())); }



Problem being the IWebSiteFolder implementation and further down the line the System.Web.Hosting.VirtualPathProvider.

When using the MediaPicker in regular content this does not cause any issues, but it does e.g. in the FeaturedItemSlider where the MediaPicker field is validated on Saving a FeaturedItem.

My quick & dirty temporary solution is to disable the validation... supported by the thought that it is unlikely for the MediaPicker to return an invalid path.

Other than that, Media Folder module works great - no issues at all on Orchard 1.5. For what it's worth: big fat +1 from me.

Oct 25, 2012 at 11:04 AM

Also a second issue encountered as reported in [discussion:269238]