diff --git a/umbraco.MacroEngines.Juno/RazorDynamicNode/ExamineBackedMedia.cs b/umbraco.MacroEngines.Juno/RazorDynamicNode/ExamineBackedMedia.cs index fbb4c5d155..462dd59474 100644 --- a/umbraco.MacroEngines.Juno/RazorDynamicNode/ExamineBackedMedia.cs +++ b/umbraco.MacroEngines.Juno/RazorDynamicNode/ExamineBackedMedia.cs @@ -302,17 +302,26 @@ namespace umbraco.MacroEngines } private static List GetChildrenMedia(int ParentId) { - //first check in Examine as this is WAY faster - var criteria = ExamineManager.Instance - .SearchProviderCollection["InternalSearcher"] - .CreateSearchCriteria("media"); - var filter = criteria.ParentId(ParentId); - var results = ExamineManager - .Instance.SearchProviderCollection["InternalSearcher"] - .Search(filter.Compile()); - if (results.Any()) + try { - return results.ToList().ConvertAll(result => new ExamineBackedMedia(result)); + //first check in Examine as this is WAY faster + var criteria = ExamineManager.Instance + .SearchProviderCollection["InternalSearcher"] + .CreateSearchCriteria("media"); + var filter = criteria.ParentId(ParentId); + var results = ExamineManager + .Instance.SearchProviderCollection["InternalSearcher"] + .Search(filter.Compile()); + if (results.Any()) + { + return results.ToList().ConvertAll(result => new ExamineBackedMedia(result)); + } + } + catch (FileNotFoundException) + { + //Currently examine is throwing FileNotFound exceptions when we have a loadbalanced filestore and a node is published in umbraco + //See this thread: http://examine.cdodeplex.com/discussions/264341 + //Catch the exception here for the time being, and just fallback to GetMedia } var media = umbraco.library.GetMedia(ParentId, true);