Merge remote-tracking branch 'origin/v8/dev' into netcore/dev

# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	src/Umbraco.Core/CompositionExtensions.cs
#	src/Umbraco.Core/Constants-AppSettings.cs
#	src/Umbraco.Core/GuidUdi.cs
#	src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs
#	src/Umbraco.Core/PublishedContentExtensions.cs
#	src/Umbraco.Core/Routing/DefaultUrlProvider.cs
#	src/Umbraco.Core/Routing/UrlProvider.cs
#	src/Umbraco.Core/Routing/UrlProviderExtensions.cs
#	src/Umbraco.Core/Runtime/MainDom.cs
#	src/Umbraco.Core/Services/IRuntimeState.cs
#	src/Umbraco.Core/StringExtensions.cs
#	src/Umbraco.Core/Sync/ApplicationUrlHelper.cs
#	src/Umbraco.Core/Sync/DatabaseServerRegistrar.cs
#	src/Umbraco.Core/Sync/IServerRegistrar.cs
#	src/Umbraco.Infrastructure/Media/EmbedProviders/Instagram.cs
#	src/Umbraco.Infrastructure/Models/ContentBaseExtensions.cs
#	src/Umbraco.Infrastructure/PropertyEditors/NestedContentPropertyEditor.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValue.cs
#	src/Umbraco.Tests/Misc/ApplicationUrlHelperTests.cs
#	src/Umbraco.Tests/Routing/UrlProviderTests.cs
#	src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs
#	src/Umbraco.Tests/TestHelpers/TestObjects.cs
#	src/Umbraco.Web.UI/Umbraco/Views/Default.cshtml
#	src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Rte.cshtml
#	src/Umbraco.Web/CompositionExtensions.cs
#	src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs
#	src/Umbraco.Web/ImageCropperTemplateExtensions.cs
#	src/Umbraco.Web/Models/Mapping/ContentMapDefinition.cs
#	src/Umbraco.Web/PropertyEditors/MultiUrlPickerPropertyEditor.cs
#	src/Umbraco.Web/PublishedContentExtensions.cs
#	src/Umbraco.Web/Runtime/WebInitialComponent.cs
#	src/Umbraco.Web/Runtime/WebInitialComposer.cs
#	src/Umbraco.Web/Templates/TemplateUtilities.cs
#	src/Umbraco.Web/UmbracoContext.cs
#	src/Umbraco.Web/UmbracoHelper.cs
#	src/Umbraco.Web/UmbracoInjectedModule.cs
This commit is contained in:
Bjarke Berg
2020-11-30 11:24:24 +01:00
344 changed files with 24333 additions and 2279 deletions

View File

@@ -109,8 +109,8 @@ namespace Umbraco.Web.PublishedCache.NuCache
content = FollowRoute(content, parts, 1, culture);
}
// if hideTopLevelNodePath is true then for url /foo we looked for /*/foo
// but maybe that was the url of a non-default top-level node, so we also
// if hideTopLevelNodePath is true then for URL /foo we looked for /*/foo
// but maybe that was the URL of a non-default top-level node, so we also
// have to look for /foo (see note in ApplyHideTopLevelNodeFromPath).
if (content == null && hideTopLevelNode.Value && parts.Length == 1)
{
@@ -141,7 +141,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
hideTopLevelNode = hideTopLevelNode ?? HideTopLevelNodeFromPath; // default = settings
// walk up from that node until we hit a node with a domain,
// or we reach the content root, collecting urls in the way
// or we reach the content root, collecting URLs in the way
var pathParts = new List<string>();
var n = node;
var urlSegment = n.UrlSegment(_variationContextAccessor, culture);

View File

@@ -1383,7 +1383,11 @@ namespace Umbraco.Web.PublishedCache.NuCache
{
_collectTask = null;
}
}, TaskContinuationOptions.ExecuteSynchronously);
},
CancellationToken.None,
TaskContinuationOptions.ExecuteSynchronously,
// Must explicitly specify this, see https://blog.stephencleary.com/2013/10/continuewith-is-dangerous-too.html
TaskScheduler.Default);
// ReSharper restore InconsistentlySynchronizedField
return task;

View File

@@ -36,15 +36,16 @@ namespace Umbraco.Web.PublishedCache.NuCache
_urlSegment = ContentData.UrlSegment;
IsPreviewing = ContentData.Published == false;
var properties = new List<IPublishedProperty>();
var properties = new IPublishedProperty[_contentNode.ContentType.PropertyTypes.Count()];
int i =0;
foreach (var propertyType in _contentNode.ContentType.PropertyTypes)
{
// add one property per property type - this is required, for the indexing to work
// if contentData supplies pdatas, use them, else use null
contentData.Properties.TryGetValue(propertyType.Alias, out var pdatas); // else will be null
properties.Add(new Property(propertyType, this, pdatas, _publishedSnapshotAccessor));
properties[i++] =new Property(propertyType, this, pdatas, _publishedSnapshotAccessor);
}
PropertiesArray = properties.ToArray();
PropertiesArray = properties;
}
// used when cloning in ContentNode

View File

@@ -380,7 +380,11 @@ namespace Umbraco.Web.PublishedCache.NuCache
{
_collectTask = null;
}
}, TaskContinuationOptions.ExecuteSynchronously);
},
CancellationToken.None,
TaskContinuationOptions.ExecuteSynchronously,
// Must explicitly specify this, see https://blog.stephencleary.com/2013/10/continuewith-is-dangerous-too.html
TaskScheduler.Default);
// ReSharper restore InconsistentlySynchronizedField
return task;