We have moved to GitHub Issues
Created by Lee Kelleher 02 Nov 2016, 12:51:12 Updated by Sebastiaan Janssen 20 Feb 2017, 13:52:50Tags: Unscheduled
Relates to #U4-8856
[I added a comment...|http://issues.umbraco.org/issue/U4-8856#comment=67-32370]
I have a question about the
So the logic goes...
- Query Examine for media item - making sure that it hasn't been trashed (checking path for
- If the media item isn't in Examine, then get from the MediaService and return
My question is, if when querying Examine we're checking if the item is trashed, but we're not doing the same when querying the MediaService. Wouldn't this mean that it will always return a trashed media item?
@zpqrtbnk [replied in agreement|http://issues.umbraco.org/issue/U4-8856#comment=67-32373]...
methink you're right and it should read
var media = ApplicationContext.Current.Services.MediaService.GetById(id);
if (media == null || media.Trashed) return null; // not found, ok
Correct? Will fix.
''Raising this ticket for completion.''
test: media cache should not find a trashed media anymore
Backwards Compatible: True
Due in version: 7.5.5
Sprint: Sprint 45