Working on: U4-5711 Media cache valueDictionary exception

This commit is contained in:
Shannon
2014-11-18 12:23:32 +11:00
parent c47d59a257
commit f3f6504398
3 changed files with 69 additions and 42 deletions

View File

@@ -192,6 +192,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
}
}
LogHelper.Debug<PublishedMediaCache>(
"Could not retrieve media {0} from Examine index, reverting to looking up media via legacy library.GetMedia method",
() => id);
var media = global::umbraco.library.GetMedia(id, true);
if (media != null && media.Current != null)
{
@@ -213,6 +217,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
return ConvertFromXPathNavigator(media.Current);
}
LogHelper.Debug<PublishedMediaCache>(
"Could not retrieve media {0} from Examine index or from legacy library.GetMedia method",
() => id);
return null;
}