mikeedwards83 / Glass.Mapper

Version 5 of the Glass mapping framework, the best ORM for Sitecore.
Apache License 2.0
124 stars 122 forks source link

Media Content rendering doesn't use correct Context.Language value #277

Open ViacheslavSedletskyi opened 7 years ago

ViacheslavSedletskyi commented 7 years ago

The problem is similar to issue #119. The difference that problem causes when we using Src property of Glass.Mapper.Sc.Fields.Image class and render the page. I discover that we can't get correct media content bases on Context.Language. The problem related to SitecoreFieldImageMapper class in MapToImage method. Suggested solution (in issue #119) within specifying MediaOptions and pull it in method call will resolve the problem: img.Src = MediaManager.GetMediaUrl(field.MediaItem, OPTIONS);

Do you have any updates with this?

cardinal252 commented 7 years ago

I think I remember working on something to do with this on a version of Sitecore. It was reported as a Glass issue, but then I proved that the options were ignored by sitecore on certain overloads?