Merge branch 'v8/dev' into v8/contrib

This commit is contained in:
Sebastiaan Janssen
2021-05-21 15:07:28 +02:00
6 changed files with 20 additions and 32 deletions

View File

@@ -18,5 +18,5 @@ using System.Resources;
[assembly: AssemblyVersion("8.0.0")] [assembly: AssemblyVersion("8.0.0")]
// these are FYI and changed automatically // these are FYI and changed automatically
[assembly: AssemblyFileVersion("8.13.0")] [assembly: AssemblyFileVersion("8.14.0")]
[assembly: AssemblyInformationalVersion("8.13.0-rc")] [assembly: AssemblyInformationalVersion("8.14.0-rc")]

View File

@@ -348,9 +348,12 @@
<WebProjectProperties> <WebProjectProperties>
<UseIIS>False</UseIIS> <UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort> <AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>8130</DevelopmentServerPort> <DevelopmentServerPort>8140</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath> <DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:8130</IISUrl> <IISUrl>http://localhost:8140</IISUrl>
<DevelopmentServerPort>8131</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:8131</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer> <UseCustomServer>False</UseCustomServer>
<CustomServerUrl> <CustomServerUrl>

View File

@@ -1907,7 +1907,6 @@ Mange hilsner fra Umbraco robotten
<key alias="addBlock">Tilføj indhold</key> <key alias="addBlock">Tilføj indhold</key>
<key alias="addThis">Tilføj %0%</key> <key alias="addThis">Tilføj %0%</key>
<key alias="propertyEditorNotSupported">Feltet %0% bruger editor %1% som ikke er supporteret for blokke.</key> <key alias="propertyEditorNotSupported">Feltet %0% bruger editor %1% som ikke er supporteret for blokke.</key>
</area>
</area> </area>
<area alias="contentTemplatesDashboard"> <area alias="contentTemplatesDashboard">
<key alias="whatHeadline">Hvad er Indholdsskabeloner?</key> <key alias="whatHeadline">Hvad er Indholdsskabeloner?</key>

View File

@@ -3,6 +3,7 @@ using Umbraco.Core;
using Umbraco.Core.Cache; using Umbraco.Core.Cache;
using Umbraco.Core.Models; using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.Persistence.Repositories.Implement;
using Umbraco.Core.PropertyEditors.ValueConverters; using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Core.Services; using Umbraco.Core.Services;
using Umbraco.Web.PublishedCache; using Umbraco.Web.PublishedCache;
@@ -56,6 +57,11 @@ namespace Umbraco.Web.Cache
foreach (var payload in payloads) foreach (var payload in payloads)
{ {
_idkMap.ClearCache(payload.Id); _idkMap.ClearCache(payload.Id);
if (dataTypeCache.Success)
{
dataTypeCache.Result.Clear(RepositoryCacheKeys.GetKey<IDataType, int>(payload.Id));
}
} }
// TODO: not sure I like these? // TODO: not sure I like these?

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Linq; using System.Linq;
@@ -174,7 +174,7 @@ namespace Umbraco.Web
// else... if we have a property, at least let the converter return its own // else... if we have a property, at least let the converter return its own
// vision of 'no value' (could be an empty enumerable) - otherwise, default // vision of 'no value' (could be an empty enumerable) - otherwise, default
return property == null ? default : property.Value<T>(culture, segment, fallback, defaultValue); return property == null ? default : property.Value<T>(culture, segment);
} }
#endregion #endregion

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Umbraco.Core; using Umbraco.Core;
using Umbraco.Core.Composing; using Umbraco.Core.Composing;
using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Models.PublishedContent;
@@ -36,16 +37,9 @@ namespace Umbraco.Web
// we have a value // we have a value
// try to cast or convert it // try to cast or convert it
var value = property.GetValue(culture, segment); var value = property.GetValue(culture, segment);
if (value is T valueAsT) if (value is T valueAsT) return valueAsT;
{
return valueAsT;
}
var valueConverted = value.TryConvertTo<T>(); var valueConverted = value.TryConvertTo<T>();
if (valueConverted) if (valueConverted) return valueConverted.Result;
{
return valueConverted.Result;
}
// cannot cast nor convert the value, nothing we can return but 'default' // cannot cast nor convert the value, nothing we can return but 'default'
// note: we don't want to fallback in that case - would make little sense // note: we don't want to fallback in that case - would make little sense
@@ -54,28 +48,14 @@ namespace Umbraco.Web
// we don't have a value, try fallback // we don't have a value, try fallback
if (PublishedValueFallback.TryGetValue(property, culture, segment, fallback, defaultValue, out var fallbackValue)) if (PublishedValueFallback.TryGetValue(property, culture, segment, fallback, defaultValue, out var fallbackValue))
{
return fallbackValue; return fallbackValue;
}
// we don't have a value - neither direct nor fallback // we don't have a value - neither direct nor fallback
// give a chance to the converter to return something (eg empty enumerable) // give a chance to the converter to return something (eg empty enumerable)
var noValue = property.GetValue(culture, segment); var noValue = property.GetValue(culture, segment);
if (noValue == null) if (noValue is T noValueAsT) return noValueAsT;
{
return default;
}
if (noValue is T noValueAsT)
{
return noValueAsT;
}
var noValueConverted = noValue.TryConvertTo<T>(); var noValueConverted = noValue.TryConvertTo<T>();
if (noValueConverted) if (noValueConverted) return noValueConverted.Result;
{
return noValueConverted.Result;
}
// cannot cast noValue nor convert it, nothing we can return but 'default' // cannot cast noValue nor convert it, nothing we can return but 'default'
return default; return default;