diff --git a/global.json b/global.json index 17a23f4270..4c4c3ae5ed 100644 --- a/global.json +++ b/global.json @@ -2,6 +2,6 @@ "sdk": { "version": "8.0.100", "rollForward": "latestFeature", - "allowPrerelease": true + "allowPrerelease": false } } diff --git a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj index 04e711f8d9..baab56e96e 100644 --- a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj +++ b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Umbraco.Cms.Persistence.EFCore.Sqlite/Umbraco.Cms.Persistence.EFCore.Sqlite.csproj b/src/Umbraco.Cms.Persistence.EFCore.Sqlite/Umbraco.Cms.Persistence.EFCore.Sqlite.csproj index 92eb79375f..84e88c3523 100644 --- a/src/Umbraco.Cms.Persistence.EFCore.Sqlite/Umbraco.Cms.Persistence.EFCore.Sqlite.csproj +++ b/src/Umbraco.Cms.Persistence.EFCore.Sqlite/Umbraco.Cms.Persistence.EFCore.Sqlite.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Umbraco.Cms.Persistence.EFCore/EfCoreMigrationExecutor.cs b/src/Umbraco.Cms.Persistence.EFCore/EfCoreMigrationExecutor.cs index 8de8e1f1b8..d50b8b1bf5 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/EfCoreMigrationExecutor.cs +++ b/src/Umbraco.Cms.Persistence.EFCore/EfCoreMigrationExecutor.cs @@ -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(); diff --git a/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs b/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs index d901088064..3d7e01a0ad 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs +++ b/src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs @@ -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: diff --git a/src/Umbraco.Cms.Persistence.EFCore/StringExtensions.cs b/src/Umbraco.Cms.Persistence.EFCore/StringExtensions.cs new file mode 100644 index 0000000000..8b680a08b1 --- /dev/null +++ b/src/Umbraco.Cms.Persistence.EFCore/StringExtensions.cs @@ -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; + } +} diff --git a/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj b/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj index 3282f2622d..d2c8c64405 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj +++ b/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj @@ -5,9 +5,9 @@ - - - + + + diff --git a/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs b/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs index 60e519de4c..a27630bd34 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs +++ b/src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs @@ -58,7 +58,7 @@ public class UmbracoDbContext : DbContext } IEnumerable migrationProviders = StaticServiceProvider.Instance.GetServices(); - 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) { diff --git a/src/Umbraco.Cms.Persistence.Sqlite/Umbraco.Cms.Persistence.Sqlite.csproj b/src/Umbraco.Cms.Persistence.Sqlite/Umbraco.Cms.Persistence.Sqlite.csproj index 645e42d666..b49b4eebee 100644 --- a/src/Umbraco.Cms.Persistence.Sqlite/Umbraco.Cms.Persistence.Sqlite.csproj +++ b/src/Umbraco.Cms.Persistence.Sqlite/Umbraco.Cms.Persistence.Sqlite.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml index 0c893de35c..63a23da21c 100644 --- a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml +++ b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml @@ -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")), diff --git a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoInstall/Index.cshtml b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoInstall/Index.cshtml index 0c893de35c..63a23da21c 100644 --- a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoInstall/Index.cshtml +++ b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoInstall/Index.cshtml @@ -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")), diff --git a/src/Umbraco.Core/Deploy/IImageSourceParser.cs b/src/Umbraco.Core/Deploy/IImageSourceParser.cs index 0180ec0b3d..cbbaa6bc9a 100644 --- a/src/Umbraco.Core/Deploy/IImageSourceParser.cs +++ b/src/Umbraco.Core/Deploy/IImageSourceParser.cs @@ -12,13 +12,38 @@ public interface IImageSourceParser /// A list of dependencies. /// The parsed value. /// Turns src="/media/..." into src="umb://media/..." and adds the corresponding udi to the dependencies. + [Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")] string ToArtifact(string value, ICollection dependencies); + /// + /// Parses an Umbraco property value and produces an artifact property value. + /// + /// The property value. + /// A list of dependencies. + /// The context cache. + /// The parsed value. + /// Turns src="/media/..." into src="umb://media/..." and adds the corresponding udi to the dependencies. +#pragma warning disable CS0618 // Type or member is obsolete + string ToArtifact(string value, ICollection dependencies, IContextCache contextCache) => ToArtifact(value, dependencies); +#pragma warning restore CS0618 // Type or member is obsolete + /// /// Parses an artifact property value and produces an Umbraco property value. /// /// The artifact property value. /// The parsed value. /// Turns umb://media/... into /media/.... + [Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")] string FromArtifact(string value); + + /// + /// Parses an artifact property value and produces an Umbraco property value. + /// + /// The artifact property value. + /// The context cache. + /// The parsed value. + /// Turns umb://media/... into /media/.... +#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 } diff --git a/src/Umbraco.Core/Deploy/ILocalLinkParser.cs b/src/Umbraco.Core/Deploy/ILocalLinkParser.cs index 7ec3fff0fa..d84bf35af1 100644 --- a/src/Umbraco.Core/Deploy/ILocalLinkParser.cs +++ b/src/Umbraco.Core/Deploy/ILocalLinkParser.cs @@ -15,13 +15,41 @@ public interface ILocalLinkParser /// Turns {{localLink:1234}} into {{localLink:umb://{type}/{id}}} and adds the corresponding udi to the /// dependencies. /// + [Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")] string ToArtifact(string value, ICollection dependencies); + /// + /// Parses an Umbraco property value and produces an artifact property value. + /// + /// The property value. + /// A list of dependencies. + /// The context cache. + /// The parsed value. + /// + /// Turns {{localLink:1234}} into {{localLink:umb://{type}/{id}}} and adds the corresponding udi to the + /// dependencies. + /// +#pragma warning disable CS0618 // Type or member is obsolete + string ToArtifact(string value, ICollection dependencies, IContextCache contextCache) => ToArtifact(value, dependencies); +#pragma warning restore CS0618 // Type or member is obsolete + /// /// Parses an artifact property value and produces an Umbraco property value. /// /// The artifact property value. /// The parsed value. /// Turns {{localLink:umb://{type}/{id}}} into {{localLink:1234}}. + [Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")] string FromArtifact(string value); + + /// + /// Parses an artifact property value and produces an Umbraco property value. + /// + /// The artifact property value. + /// The context cache. + /// The parsed value. + /// Turns {{localLink:umb://{type}/{id}}} into {{localLink:1234}}. +#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 } diff --git a/src/Umbraco.Core/Deploy/IMacroParser.cs b/src/Umbraco.Core/Deploy/IMacroParser.cs index fed9dcc3af..17f06992d5 100644 --- a/src/Umbraco.Core/Deploy/IMacroParser.cs +++ b/src/Umbraco.Core/Deploy/IMacroParser.cs @@ -8,15 +8,38 @@ public interface IMacroParser /// Property value. /// A list of dependencies. /// Parsed value. + [Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")] string ToArtifact(string value, ICollection dependencies); + /// + /// Parses an Umbraco property value and produces an artifact property value. + /// + /// Property value. + /// A list of dependencies. + /// The context cache. + /// Parsed value. +#pragma warning disable CS0618 // Type or member is obsolete + string ToArtifact(string value, ICollection dependencies, IContextCache contextCache) => ToArtifact(value, dependencies); +#pragma warning restore CS0618 // Type or member is obsolete + /// /// Parses an artifact property value and produces an Umbraco property value. /// /// Artifact property value. /// Parsed value. + [Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")] string FromArtifact(string value); + /// + /// Parses an artifact property value and produces an Umbraco property value. + /// + /// Artifact property value. + /// The context cache. + /// Parsed value. +#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 + /// /// Tries to replace the value of the attribute/parameter with a value containing a converted identifier. /// @@ -25,5 +48,20 @@ public interface IMacroParser /// Collection to add dependencies to when performing ToArtifact /// Indicates which action is being performed (to or from artifact) /// Value with converted identifiers + [Obsolete("Please use the overload taking all parameters. This method will be removed in Umbraco 14.")] string ReplaceAttributeValue(string value, string editorAlias, ICollection dependencies, Direction direction); + + /// + /// Tries to replace the value of the attribute/parameter with a value containing a converted identifier. + /// + /// Value to attempt to convert + /// Alias of the editor used for the parameter + /// Collection to add dependencies to when performing ToArtifact + /// Indicates which action is being performed (to or from artifact) + /// The context cache. + /// Value with converted identifiers + string ReplaceAttributeValue(string value, string editorAlias, ICollection 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 } diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml index e6662d6201..3c7bb7b5ca 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml @@ -1467,7 +1467,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Add query step That matches types: No matching content - 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. + 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. Deleted item diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml index 0602ff487a..ed1b923d66 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml @@ -1507,7 +1507,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Add query step That matches types: No matching content - 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. + 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. Deleted item diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml b/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml index 5681236051..600a1724c1 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml @@ -1235,6 +1235,10 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je prullenbak zijn + + Geen overeenkomende inhoud + 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. + Verwijderd item Je hebt een media-item geselecteerd dat op dit ogenblik verwijderd of in the diff --git a/src/Umbraco.Core/Services/ContentVersionService.cs b/src/Umbraco.Core/Services/ContentVersionService.cs index 1c190311da..3d3eed062e 100644 --- a/src/Umbraco.Core/Services/ContentVersionService.cs +++ b/src/Umbraco.Core/Services/ContentVersionService.cs @@ -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(); } if (_logger.IsEnabled(Microsoft.Extensions.Logging.LogLevel.Debug)) diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 83491bbe6c..7a45a2ea14 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -7,22 +7,22 @@ - - - - - - - - - - + + + + + + + + + + - + diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs index f4bf95a455..77eed2a38b 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs @@ -110,8 +110,5 @@ public class UmbracoPlan : MigrationPlan To("{A8E01644-9F2E-4988-8341-587EF5B7EA69}"); To("{E073DBC0-9E8E-4C92-8210-9CB18364F46E}"); To("{80D282A4-5497-47FF-991F-BC0BCE603121}"); -========= - To("{D5139400-E507-4259-A542-C67358F7E329}"); ->>>>>>>>> Temporary merge branch 2 } } diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj index 75678035c3..75c652b30c 100644 --- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj +++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj @@ -16,11 +16,11 @@ - - - - - + + + + + @@ -39,8 +39,8 @@ - - + + diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs index f54158dac1..f76b176d5e 100644 --- a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs +++ b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs @@ -224,7 +224,7 @@ AND cmsContentNu.nodeId IS NULL IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document); - IEnumerable dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Document); + IEnumerable dtos = GetContentNodeDtos(sql); foreach (ContentSourceDto row in dtos) { @@ -242,7 +242,7 @@ AND cmsContentNu.nodeId IS NULL IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document); - IEnumerable dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Document); + IEnumerable dtos = GetContentNodeDtos(sql); foreach (ContentSourceDto row in dtos) { @@ -265,7 +265,7 @@ AND cmsContentNu.nodeId IS NULL IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document); - IEnumerable dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Document); + IEnumerable dtos = GetContentNodeDtos(sql); foreach (ContentSourceDto row in dtos) { @@ -301,7 +301,7 @@ AND cmsContentNu.nodeId IS NULL IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media); - IEnumerable dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Media); + IEnumerable dtos = GetMediaNodeDtos(sql); foreach (ContentSourceDto row in dtos) { @@ -319,7 +319,7 @@ AND cmsContentNu.nodeId IS NULL IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media); - IEnumerable dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Media); + IEnumerable dtos = GetMediaNodeDtos(sql); foreach (ContentSourceDto row in dtos) { @@ -342,7 +342,7 @@ AND cmsContentNu.nodeId IS NULL IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media); - IEnumerable dtos = GetContentNodeDtos(sql, Constants.ObjectTypes.Media); + IEnumerable dtos = GetMediaNodeDtos(sql); foreach (ContentSourceDto row in dtos) { @@ -990,7 +990,32 @@ WHERE cmsContentNu.nodeId IN ( return s; } - private IEnumerable GetContentNodeDtos(Sql sql, Guid nodeObjectType) + private IEnumerable GetMediaNodeDtos(Sql 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 dtos; + if (_nucacheSettings.Value.UsePagedSqlQuery) + { + // Use a more efficient COUNT query + Sql? sqlCountQuery = SqlMediaSourcesCount() + .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Media)); + + Sql? sqlCount = + SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); + + dtos = Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount); + } + else + { + dtos = Database.Fetch(sql); + } + + return dtos; + } + + private IEnumerable GetContentNodeDtos(Sql 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? sqlCountQuery = SqlContentSourcesCount() - .Append(SqlObjectTypeNotTrashed(SqlContext, nodeObjectType)); + .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Document)); Sql? sqlCount = SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); diff --git a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj index dc0d0dc6fa..5688c37c5b 100644 --- a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj +++ b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj @@ -10,11 +10,10 @@ - - + + - diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index cbcba73da7..afb8879f64 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -10,7 +10,7 @@ - + @@ -19,12 +19,6 @@ - - - all - - - <_ContentIncludedByDefault Remove="umbraco\UmbracoBackOffice\AuthorizeUpgrade.cshtml" /> <_ContentIncludedByDefault Remove="umbraco\UmbracoBackOffice\Default.cshtml" /> diff --git a/src/Umbraco.Web.Website/Controllers/UmbProfileController.cs b/src/Umbraco.Web.Website/Controllers/UmbProfileController.cs index 22d5f7e3e2..d493bb7e02 100644 --- a/src/Umbraco.Web.Website/Controllers/UmbProfileController.cs +++ b/src/Umbraco.Web.Website/Controllers/UmbProfileController.cs @@ -112,6 +112,7 @@ public class UmbProfileController : SurfaceController IdentityResult saveResult = await _memberManager.UpdateAsync(currentMember); if (!saveResult.Succeeded) { + scope.Complete(); return saveResult; } diff --git a/tests/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj b/tests/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj index 342622c094..885fc01b0e 100644 --- a/tests/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj +++ b/tests/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj @@ -4,8 +4,8 @@ - - + + diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj b/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj index 22661ce535..4839c74dfd 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj +++ b/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj @@ -11,7 +11,7 @@ - + diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj b/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj index fc4734bd6d..dd459ef520 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj @@ -10,8 +10,8 @@ - - + +