Fixes issue where media cache is not properly populated with isDoc and image propertyTypes
This commit is contained in:
@@ -526,7 +526,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
//loop through remaining values that haven't been applied
|
||||
foreach (var i in valueDictionary.Where(x => !_keysAdded.Contains(x.Key)))
|
||||
{
|
||||
IPublishedProperty property;
|
||||
IPublishedProperty property = null;
|
||||
|
||||
// must ignore that one
|
||||
if (i.Key == "version") continue;
|
||||
@@ -540,7 +540,9 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
{
|
||||
// use property type to ensure proper conversion
|
||||
var propertyType = _contentType.GetPropertyType(i.Key);
|
||||
property = new XmlPublishedProperty(propertyType, false, i.Value); // false :: never preview a media
|
||||
|
||||
if (i.Key != "isDoc" && i.Key != "image")
|
||||
property = new XmlPublishedProperty(propertyType, false, i.Value); // false :: never preview a media
|
||||
}
|
||||
|
||||
_properties.Add(property);
|
||||
|
||||
Reference in New Issue
Block a user