Merge remote-tracking branch 'origin/v13/dev' into v14/dev

# Conflicts:
#	version.json
This commit is contained in:
Bjarke Berg
2023-11-16 09:09:08 +01:00
28 changed files with 193 additions and 57 deletions

View File

@@ -2,6 +2,6 @@
"sdk": {
"version": "8.0.100",
"rollForward": "latestFeature",
"allowPrerelease": true
"allowPrerelease": false
}
}

View File

@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
</ItemGroup>

View File

@@ -21,7 +21,7 @@ public class EfCoreMigrationExecutor : IEFCoreMigrationExecutor
public async Task ExecuteSingleMigrationAsync(EFCoreMigration migration)
{
IMigrationProvider? provider = _migrationProviders.FirstOrDefault(x => x.ProviderName == _options.Value.ProviderName);
IMigrationProvider? provider = _migrationProviders.FirstOrDefault(x => x.ProviderName.CompareProviderNames(_options.Value.ProviderName));
if (provider is not null)
{
@@ -31,8 +31,7 @@ public class EfCoreMigrationExecutor : IEFCoreMigrationExecutor
public async Task ExecuteAllMigrationsAsync()
{
IMigrationProvider? provider = _migrationProviders.FirstOrDefault(x => x.ProviderName == _options.Value.ProviderName);
IMigrationProvider? provider = _migrationProviders.FirstOrDefault(x => x.ProviderName.CompareProviderNames(_options.Value.ProviderName));
if (provider is not null)
{
await provider.MigrateAllAsync();

View File

@@ -136,6 +136,7 @@ public static class UmbracoEFCoreServiceCollectionExtensions
builder.UseSqlServer(connectionString);
break;
case Constants.ProviderNames.SQLLite:
case "Microsoft.Data.SQLite":
builder.UseSqlite(connectionString);
break;
default:

View File

@@ -0,0 +1,21 @@
using Umbraco.Cms.Core;
namespace Umbraco.Cms.Persistence.EFCore;
internal static class StringExtensions
{
internal static bool CompareProviderNames(this string connectionProvider, string? compareString)
{
if (compareString is null)
{
return false;
}
if (connectionProvider == compareString)
{
return true;
}
return connectionProvider is "Microsoft.Data.SQLite" or Constants.ProviderNames.SQLLite && compareString is "Microsoft.Data.SQLite" or Constants.ProviderNames.SQLLite;
}
}

View File

@@ -5,9 +5,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0-rc.2.*"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0"/>
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="4.9.0" />
</ItemGroup>

View File

@@ -58,7 +58,7 @@ public class UmbracoDbContext : DbContext
}
IEnumerable<IMigrationProviderSetup> migrationProviders = StaticServiceProvider.Instance.GetServices<IMigrationProviderSetup>();
IMigrationProviderSetup? migrationProvider = migrationProviders.FirstOrDefault(x => x.ProviderName == connectionStrings.ProviderName);
IMigrationProviderSetup? migrationProvider = migrationProviders.FirstOrDefault(x => x.ProviderName.CompareProviderNames(connectionStrings.ProviderName));
if (migrationProvider == null && connectionStrings.ProviderName != null)
{

View File

@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -44,6 +44,7 @@
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/uuid", backofficeAssetsPath + "/external/uuid/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/dompurify", backofficeAssetsPath + "/external/dompurify/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/marked", backofficeAssetsPath + "/external/marked/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/sanitize-html", backofficeAssetsPath + "/external/marked/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/backend-api", backofficeAssetsPath + "/external/backend-api/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/class-api", backofficeAssetsPath + "/libs/class-api/index.js")),

View File

@@ -44,6 +44,7 @@
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/uuid", backofficeAssetsPath + "/external/uuid/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/dompurify", backofficeAssetsPath + "/external/dompurify/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/marked", backofficeAssetsPath + "/external/marked/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/external/sanitize-html", backofficeAssetsPath + "/external/marked/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/backend-api", backofficeAssetsPath + "/external/backend-api/index.js")),
@Html.Raw(ImportMapValue("@umbraco-cms/backoffice/class-api", backofficeAssetsPath + "/libs/class-api/index.js")),

View File

@@ -12,13 +12,38 @@ public interface IImageSourceParser
/// <param name="dependencies">A list of dependencies.</param>
/// <returns>The parsed value.</returns>
/// <remarks>Turns src="/media/..." into src="umb://media/..." and adds the corresponding udi to the dependencies.</remarks>
[Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")]
string ToArtifact(string value, ICollection<Udi> dependencies);
/// <summary>
/// Parses an Umbraco property value and produces an artifact property value.
/// </summary>
/// <param name="value">The property value.</param>
/// <param name="dependencies">A list of dependencies.</param>
/// <param name="contextCache">The context cache.</param>
/// <returns>The parsed value.</returns>
/// <remarks>Turns src="/media/..." into src="umb://media/..." and adds the corresponding udi to the dependencies.</remarks>
#pragma warning disable CS0618 // Type or member is obsolete
string ToArtifact(string value, ICollection<Udi> dependencies, IContextCache contextCache) => ToArtifact(value, dependencies);
#pragma warning restore CS0618 // Type or member is obsolete
/// <summary>
/// Parses an artifact property value and produces an Umbraco property value.
/// </summary>
/// <param name="value">The artifact property value.</param>
/// <returns>The parsed value.</returns>
/// <remarks>Turns umb://media/... into /media/....</remarks>
[Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")]
string FromArtifact(string value);
/// <summary>
/// Parses an artifact property value and produces an Umbraco property value.
/// </summary>
/// <param name="value">The artifact property value.</param>
/// <param name="contextCache">The context cache.</param>
/// <returns>The parsed value.</returns>
/// <remarks>Turns umb://media/... into /media/....</remarks>
#pragma warning disable CS0618 // Type or member is obsolete
string FromArtifact(string value, IContextCache contextCache) => FromArtifact(value);
#pragma warning restore CS0618 // Type or member is obsolete
}

View File

@@ -15,13 +15,41 @@ public interface ILocalLinkParser
/// Turns {{localLink:1234}} into {{localLink:umb://{type}/{id}}} and adds the corresponding udi to the
/// dependencies.
/// </remarks>
[Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")]
string ToArtifact(string value, ICollection<Udi> dependencies);
/// <summary>
/// Parses an Umbraco property value and produces an artifact property value.
/// </summary>
/// <param name="value">The property value.</param>
/// <param name="dependencies">A list of dependencies.</param>
/// <param name="contextCache">The context cache.</param>
/// <returns>The parsed value.</returns>
/// <remarks>
/// Turns {{localLink:1234}} into {{localLink:umb://{type}/{id}}} and adds the corresponding udi to the
/// dependencies.
/// </remarks>
#pragma warning disable CS0618 // Type or member is obsolete
string ToArtifact(string value, ICollection<Udi> dependencies, IContextCache contextCache) => ToArtifact(value, dependencies);
#pragma warning restore CS0618 // Type or member is obsolete
/// <summary>
/// Parses an artifact property value and produces an Umbraco property value.
/// </summary>
/// <param name="value">The artifact property value.</param>
/// <returns>The parsed value.</returns>
/// <remarks>Turns {{localLink:umb://{type}/{id}}} into {{localLink:1234}}.</remarks>
[Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")]
string FromArtifact(string value);
/// <summary>
/// Parses an artifact property value and produces an Umbraco property value.
/// </summary>
/// <param name="value">The artifact property value.</param>
/// <param name="contextCache">The context cache.</param>
/// <returns>The parsed value.</returns>
/// <remarks>Turns {{localLink:umb://{type}/{id}}} into {{localLink:1234}}.</remarks>
#pragma warning disable CS0618 // Type or member is obsolete
string FromArtifact(string value, IContextCache contextCache) => FromArtifact(value);
#pragma warning restore CS0618 // Type or member is obsolete
}

View File

@@ -8,15 +8,38 @@ public interface IMacroParser
/// <param name="value">Property value.</param>
/// <param name="dependencies">A list of dependencies.</param>
/// <returns>Parsed value.</returns>
[Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")]
string ToArtifact(string value, ICollection<Udi> dependencies);
/// <summary>
/// Parses an Umbraco property value and produces an artifact property value.
/// </summary>
/// <param name="value">Property value.</param>
/// <param name="dependencies">A list of dependencies.</param>
/// <param name="contextCache">The context cache.</param>
/// <returns>Parsed value.</returns>
#pragma warning disable CS0618 // Type or member is obsolete
string ToArtifact(string value, ICollection<Udi> dependencies, IContextCache contextCache) => ToArtifact(value, dependencies);
#pragma warning restore CS0618 // Type or member is obsolete
/// <summary>
/// Parses an artifact property value and produces an Umbraco property value.
/// </summary>
/// <param name="value">Artifact property value.</param>
/// <returns>Parsed value.</returns>
[Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")]
string FromArtifact(string value);
/// <summary>
/// Parses an artifact property value and produces an Umbraco property value.
/// </summary>
/// <param name="value">Artifact property value.</param>
/// <param name="contextCache">The context cache.</param>
/// <returns>Parsed value.</returns>
#pragma warning disable CS0618 // Type or member is obsolete
string FromArtifact(string value, IContextCache contextCache) => FromArtifact(value);
#pragma warning restore CS0618 // Type or member is obsolete
/// <summary>
/// Tries to replace the value of the attribute/parameter with a value containing a converted identifier.
/// </summary>
@@ -25,5 +48,20 @@ public interface IMacroParser
/// <param name="dependencies">Collection to add dependencies to when performing ToArtifact</param>
/// <param name="direction">Indicates which action is being performed (to or from artifact)</param>
/// <returns>Value with converted identifiers</returns>
[Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")]
string ReplaceAttributeValue(string value, string editorAlias, ICollection<Udi> dependencies, Direction direction);
/// <summary>
/// Tries to replace the value of the attribute/parameter with a value containing a converted identifier.
/// </summary>
/// <param name="value">Value to attempt to convert</param>
/// <param name="editorAlias">Alias of the editor used for the parameter</param>
/// <param name="dependencies">Collection to add dependencies to when performing ToArtifact</param>
/// <param name="direction">Indicates which action is being performed (to or from artifact)</param>
/// <param name="contextCache">The context cache.</param>
/// <returns>Value with converted identifiers</returns>
string ReplaceAttributeValue(string value, string editorAlias, ICollection<Udi> dependencies, Direction direction, IContextCache contextCache)
#pragma warning disable CS0618 // Type or member is obsolete
=> ReplaceAttributeValue(value, editorAlias, dependencies, direction);
#pragma warning restore CS0618 // Type or member is obsolete
}

View File

@@ -1467,7 +1467,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="addQueryStep">Add query step</key>
<key alias="queryStepTypes">That matches types: </key>
<key alias="noValidStartNodeTitle">No matching content</key>
<key alias="noValidStartNodeDesc">The configuration of this property does not match any content. Create the missing content or contact your adminnistrator to adjust the Dynamic Root settings for this property.</key>
<key alias="noValidStartNodeDesc">The configuration of this property does not match any content. Create the missing content or contact your administrator to adjust the Dynamic Root settings for this property.</key>
</area>
<area alias="mediaPicker">
<key alias="deletedItem">Deleted item</key>

View File

@@ -1507,7 +1507,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="addQueryStep">Add query step</key>
<key alias="queryStepTypes">That matches types: </key>
<key alias="noValidStartNodeTitle">No matching content</key>
<key alias="noValidStartNodeDesc">The configuration of this property does not match any content. Create the missing content or contact your adminnistrator to adjust the Dynamic Root settings for this property.</key>
<key alias="noValidStartNodeDesc">The configuration of this property does not match any content. Create the missing content or contact your administrator to adjust the Dynamic Root settings for this property.</key>
</area>
<area alias="mediaPicker">
<key alias="deletedItem">Deleted item</key>

View File

@@ -1235,6 +1235,10 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
prullenbak zijn
</key>
</area>
<area alias="dynamicRoot">
<key alias="noValidStartNodeTitle">Geen overeenkomende inhoud</key>
<key alias="noValidStartNodeDesc">De configuratie van deze eigenschap komt met geen enkele inhoud overeen. Maak de ontbrekende inhoud aan of neem contact op met uw beheerder om de dynamische root-instellingen voor deze eigenschap aan te passen.</key>
</area>
<area alias="mediaPicker">
<key alias="deletedItem">Verwijderd item</key>
<key alias="pickedTrashedItem">Je hebt een media-item geselecteerd dat op dit ogenblik verwijderd of in the

View File

@@ -77,6 +77,7 @@ internal class ContentVersionService : IContentVersionService
if (version is null)
{
scope.Complete();
return;
}
@@ -128,6 +129,7 @@ internal class ContentVersionService : IContentVersionService
if (allHistoricVersions is null)
{
scope.Complete();
return Array.Empty<ContentVersionMeta>();
}
if (_logger.IsEnabled(Microsoft.Extensions.Logging.LogLevel.Debug))

View File

@@ -7,22 +7,22 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0-rc.2.*" />
<PackageReference Include="System.Runtime.Caching" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
<PackageReference Include="System.Runtime.Caching" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<!-- Update implicit dependencies to fix security issues, even though we do not use them explicitly and they are taken from the shared framework instead of NuGet -->
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="7.0.1" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

View File

@@ -110,8 +110,5 @@ public class UmbracoPlan : MigrationPlan
To<V_14_0_0.AddGuidsToUsers>("{A8E01644-9F2E-4988-8341-587EF5B7EA69}");
To<V_14_0_0.UpdateDefaultGuidsOfCreatedPackages>("{E073DBC0-9E8E-4C92-8210-9CB18364F46E}");
To<V_14_0_0.RenameTechnologyLeakingPropertyEditorAliases>("{80D282A4-5497-47FF-991F-BC0BCE603121}");
=========
To<V_13_0_0.RenameEventNameColumn>("{D5139400-E507-4259-A542-C67358F7E329}");
>>>>>>>>> Temporary merge branch 2
}
}

View File

@@ -16,11 +16,11 @@
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="Markdown" Version="2.2.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.0" />
<PackageReference Include="MiniProfiler.Shared" Version="4.3.8" />
<PackageReference Include="ncrontab" Version="3.3.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
@@ -39,8 +39,8 @@
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Map" Version="1.0.2" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="7.0.3" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="8.0.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -224,7 +224,7 @@ AND cmsContentNu.nodeId IS NULL
IContentCacheDataSerializer serializer =
_contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Document);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql);
foreach (ContentSourceDto row in dtos)
{
@@ -242,7 +242,7 @@ AND cmsContentNu.nodeId IS NULL
IContentCacheDataSerializer serializer =
_contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Document);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql);
foreach (ContentSourceDto row in dtos)
{
@@ -265,7 +265,7 @@ AND cmsContentNu.nodeId IS NULL
IContentCacheDataSerializer serializer =
_contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Document);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql);
foreach (ContentSourceDto row in dtos)
{
@@ -301,7 +301,7 @@ AND cmsContentNu.nodeId IS NULL
IContentCacheDataSerializer serializer =
_contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Media);
IEnumerable<ContentSourceDto> dtos = GetMediaNodeDtos(sql);
foreach (ContentSourceDto row in dtos)
{
@@ -319,7 +319,7 @@ AND cmsContentNu.nodeId IS NULL
IContentCacheDataSerializer serializer =
_contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Media);
IEnumerable<ContentSourceDto> dtos = GetMediaNodeDtos(sql);
foreach (ContentSourceDto row in dtos)
{
@@ -342,7 +342,7 @@ AND cmsContentNu.nodeId IS NULL
IContentCacheDataSerializer serializer =
_contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media);
IEnumerable<ContentSourceDto> dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Media);
IEnumerable<ContentSourceDto> dtos = GetMediaNodeDtos(sql);
foreach (ContentSourceDto row in dtos)
{
@@ -990,7 +990,32 @@ WHERE cmsContentNu.nodeId IN (
return s;
}
private IEnumerable<ContentSourceDto> GetContentNodeDtos(Sql<ISqlContext> sql, Guid nodeObjectType)
private IEnumerable<ContentSourceDto> GetMediaNodeDtos(Sql<ISqlContext> sql)
{
// We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout.
// We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that.
// QueryPaged is very slow on large sites however, so use fetch if UsePagedSqlQuery is disabled.
IEnumerable<ContentSourceDto> dtos;
if (_nucacheSettings.Value.UsePagedSqlQuery)
{
// Use a more efficient COUNT query
Sql<ISqlContext>? sqlCountQuery = SqlMediaSourcesCount()
.Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Media));
Sql<ISqlContext>? sqlCount =
SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl");
dtos = Database.QueryPaged<ContentSourceDto>(_nucacheSettings.Value.SqlPageSize, sql, sqlCount);
}
else
{
dtos = Database.Fetch<ContentSourceDto>(sql);
}
return dtos;
}
private IEnumerable<ContentSourceDto> GetContentNodeDtos(Sql<ISqlContext> sql)
{
// We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout.
// We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that.
@@ -1000,7 +1025,7 @@ WHERE cmsContentNu.nodeId IN (
{
// Use a more efficient COUNT query
Sql<ISqlContext>? sqlCountQuery = SqlContentSourcesCount()
.Append(SqlObjectTypeNotTrashed(SqlContext, nodeObjectType));
.Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Document));
Sql<ISqlContext>? sqlCount =
SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl");

View File

@@ -10,11 +10,10 @@
<PackageReference Include="Asp.Versioning.Mvc" Version="7.1.0" />
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="7.1.0" />
<PackageReference Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.0" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="2.0.2" />
<PackageReference Include="Smidge.InMemory" Version="4.3.0" />
<PackageReference Include="Smidge.Nuglify" Version="4.3.0" />
</ItemGroup>

View File

@@ -10,7 +10,7 @@
<ItemGroup>
<ProjectReference Include="..\Umbraco.Cms\Umbraco.Cms.csproj" />
<!-- Add design/build time support for EF Core migrations -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0-rc.2.*" PrivateAssets="all" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
@@ -19,12 +19,6 @@
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0-rc.2.*">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="umbraco\UmbracoBackOffice\AuthorizeUpgrade.cshtml" />
<_ContentIncludedByDefault Remove="umbraco\UmbracoBackOffice\Default.cshtml" />

View File

@@ -112,6 +112,7 @@ public class UmbProfileController : SurfaceController
IdentityResult saveResult = await _memberManager.UpdateAsync(currentMember);
if (!saveResult.Succeeded)
{
scope.Complete();
return saveResult;
}

View File

@@ -4,8 +4,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0-rc.2.*" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Moq" Version="4.18.4" />
</ItemGroup>

View File

@@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" PrivateAssets="all" />

View File

@@ -10,8 +10,8 @@
<PackageReference Include="AngleSharp" Version="1.0.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="System.Data.Odbc" Version="8.0.0-rc.2.*" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0-rc.2.*" />
<PackageReference Include="System.Data.Odbc" Version="8.0.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
</ItemGroup>
<ItemGroup>