Merge pull request #1563 from umbraco/temp-u4-9137

U4-9137 - Fix PublishedMediaCache getting trashed media
This commit is contained in:
Claus
2016-11-03 11:25:21 +01:00
committed by GitHub

View File

@@ -226,7 +226,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
// the media from the service, first
var media = ApplicationContext.Current.Services.MediaService.GetById(id);
if (media == null) return null; // not found, ok
if (media == null || media.Trashed) return null; // not found, ok
// so, the media was not found in Examine's index *yet* it exists, which probably indicates that
// the index is corrupted. Or not up-to-date. Log a warning, but only once, and only if seeing the