Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco-Core

# Conflicts:
#	build/build.ps1
#	src/Umbraco.Core/Configuration/ConfigConnectionString.cs
#	src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs
#	src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs
#	src/Umbraco.Core/Models/ContentType.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
#	tests/Umbraco.Tests.AcceptanceTest/package.json
This commit is contained in:
Nikolaj Geisle
2022-03-16 13:00:38 +01:00
480 changed files with 11569 additions and 6721 deletions

View File

@@ -13,9 +13,7 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static string LangId(string culture)
{
return culture != null ? ("-L:" + culture) : string.Empty;
}
=> string.IsNullOrEmpty(culture) ? string.Empty : ("-L:" + culture);
public static string PublishedContentChildren(Guid contentUid, bool previewing)
{

View File

@@ -608,7 +608,10 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
throw new ArgumentException("Kit content cannot have children.", nameof(kit));
// ReSharper restore LocalizableElement
_logger.LogDebug("Set content ID: {KitNodeId}", kit.Node.Id);
if (_logger.IsEnabled(LogLevel.Debug))
{
_logger.LogDebug("Set content ID: {KitNodeId}", kit.Node.Id);
}
// get existing
_contentNodes.TryGetValue(kit.Node.Id, out var link);
@@ -727,7 +730,11 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
previousNode = null; // there is no previous sibling
}
_logger.LogDebug("Set {thisNodeId} with parent {thisNodeParentContentId}", thisNode.Id, thisNode.ParentContentId);
if (_logger.IsEnabled(LogLevel.Debug))
{
_logger.LogDebug("Set {thisNodeId} with parent {thisNodeParentContentId}", thisNode.Id, thisNode.ParentContentId);
}
SetValueLocked(_contentNodes, thisNode.Id, thisNode);
// if we are initializing from the database source ensure the local db is updated
@@ -784,7 +791,12 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
ok = false;
continue; // skip that one
}
_logger.LogDebug("Set {kitNodeId} with parent {kitNodeParentContentId}", kit.Node.Id, kit.Node.ParentContentId);
if (_logger.IsEnabled(LogLevel.Debug))
{
_logger.LogDebug("Set {kitNodeId} with parent {kitNodeParentContentId}", kit.Node.Id, kit.Node.ParentContentId);
}
SetValueLocked(_contentNodes, kit.Node.Id, kit.Node);
if (_localDb != null) RegisterChange(kit.Node.Id, kit);
@@ -873,7 +885,11 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
if (link?.Value == null) return false;
var content = link.Value;
_logger.LogDebug("Clear content ID: {ContentId}", content.Id);
if (_logger.IsEnabled(LogLevel.Debug))
{
_logger.LogDebug("Clear content ID: {ContentId}", content.Id);
}
// clear the entire branch
ClearBranchLocked(content);

View File

@@ -364,7 +364,7 @@ AND cmsContentNu.nodeId IS NULL
foreach (IProperty prop in content.Properties)
{
var pdatas = new List<PropertyData>();
foreach (IPropertyValue pvalue in prop.Values)
foreach (IPropertyValue pvalue in prop.Values.OrderBy(x => x.Culture))
{
// sanitize - properties should be ok but ... never knows
if (!prop.PropertyType.SupportsVariation(pvalue.Culture, pvalue.Segment))