diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 345e3bde88..da728fffb3 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -146,7 +146,7 @@ stages: inputs: targetType: inline script: | - choco install docfx --version=2.59.2 -y + choco install docfx --version=2.59.4 -y if ($lastexitcode -ne 0){ throw ("Error installing DocFX") } diff --git a/src/Umbraco.Core/EmbeddedResources/Snippets/RegisterMember.cshtml b/src/Umbraco.Core/EmbeddedResources/Snippets/RegisterMember.cshtml index ca45ff5746..f3b9e31254 100644 --- a/src/Umbraco.Core/EmbeddedResources/Snippets/RegisterMember.cshtml +++ b/src/Umbraco.Core/EmbeddedResources/Snippets/RegisterMember.cshtml @@ -18,6 +18,9 @@ // Set to true if you want the member editable properties shown. // It will only displays properties marked as "Member can edit" on the "Info" tab of the Member Type. .WithCustomProperties(false) + // By default the member will be logged in automatically after registration. + // Set this to false if the member should not be logged in automatically. + .WithAutomaticLogIn(true) .Build(); var success = TempData["FormSuccess"] != null; @@ -39,7 +42,8 @@ else new { MemberTypeAlias = registerModel.MemberTypeAlias, UsernameIsEmail = registerModel.UsernameIsEmail, - RedirectUrl = registerModel.RedirectUrl + RedirectUrl = registerModel.RedirectUrl, + AutomaticLogIn = registerModel.AutomaticLogIn })) {

Create a new account.

diff --git a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs index 8d2886c223..a988a5f475 100644 --- a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs +++ b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs @@ -36,7 +36,12 @@ public class DatabaseConfigureStep : InstallSetupStep public override Task ExecuteAsync(DatabaseModel databaseSettings) { - if (!_databaseBuilder.ConfigureDatabaseConnection(databaseSettings, false)) + if (databaseSettings is null && string.IsNullOrWhiteSpace(_connectionStrings.CurrentValue.ConnectionString) is false) + { + return Task.FromResult(null); + } + + if (!_databaseBuilder.ConfigureDatabaseConnection(databaseSettings!, false)) { throw new InstallException("Could not connect to the database"); } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs index 750c65c21a..5b13349dbd 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs @@ -2,6 +2,7 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration; using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_10_0_0; using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_10_2_0; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_10_5_0; namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade; @@ -80,5 +81,8 @@ public class UmbracoPlan : MigrationPlan // To 10.4.0 To("{3F5D492A-A3DB-43F9-A73E-9FEE3B180E6C}"); + + // to 10.5.0 / 11.2.0 + To("{83AF7945-DADE-4A02-9041-F3F6EBFAC319}"); } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_5_0/AddPrimaryKeyConstrainToContentVersionCleanupDtos.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_5_0/AddPrimaryKeyConstrainToContentVersionCleanupDtos.cs new file mode 100644 index 0000000000..331a6fced6 --- /dev/null +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_5_0/AddPrimaryKeyConstrainToContentVersionCleanupDtos.cs @@ -0,0 +1,27 @@ +using Umbraco.Cms.Infrastructure.Persistence.Dtos; + +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_10_5_0; + +public class AddPrimaryKeyConstrainToContentVersionCleanupDtos : MigrationBase +{ + public AddPrimaryKeyConstrainToContentVersionCleanupDtos(IMigrationContext context) : base(context) + { + } + + protected override void Migrate() + { + IEnumerable contentVersionCleanupPolicyDtos = + Database + .Fetch() + .OrderByDescending(x => x.Updated) + .DistinctBy(x => x.ContentTypeId); + + if (TableExists(ContentVersionCleanupPolicyDto.TableName)) + { + Delete.Table(ContentVersionCleanupPolicyDto.TableName).Do(); + } + + Create.Table().Do(); + Database.InsertBatch(contentVersionCleanupPolicyDtos); + } +} diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCleanupPolicyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCleanupPolicyDto.cs index da0771df01..128c59594b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCleanupPolicyDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCleanupPolicyDto.cs @@ -13,7 +13,8 @@ internal class ContentVersionCleanupPolicyDto public const string TableName = Constants.DatabaseSchema.Tables.ContentVersionCleanupPolicy; [Column("contentTypeId")] - [ForeignKey(typeof(ContentTypeDto), Column = "nodeId", OnDelete = Rule.Cascade)] + [PrimaryKeyColumn(AutoIncrement = false)] + [ForeignKey(typeof(ContentTypeDto), Column = "nodeId")] public int ContentTypeId { get; set; } [Column("preventCleanup")] diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs index 9e35999071..cd9f104bc0 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs @@ -180,6 +180,7 @@ internal class ContentTypeRepository : ContentTypeRepositoryBase, protected override IEnumerable GetDeleteClauses() { var l = (List)base.GetDeleteClauses(); // we know it's a list + l.Add("DELETE FROM umbracoContentVersionCleanupPolicy WHERE contentTypeId = @id"); l.Add("DELETE FROM cmsDocumentType WHERE contentTypeNodeId = @id"); l.Add("DELETE FROM cmsContentType WHERE nodeId = @id"); l.Add("DELETE FROM umbracoNode WHERE id = @id"); diff --git a/src/Umbraco.Web.BackOffice/Controllers/MacroRenderingController.cs b/src/Umbraco.Web.BackOffice/Controllers/MacroRenderingController.cs index a4cb568857..b2261acb2f 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/MacroRenderingController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/MacroRenderingController.cs @@ -125,13 +125,8 @@ public class MacroRenderingController : UmbracoAuthorizedJsonController // When rendering the macro in the backoffice the default setting would be to use the Culture of the logged in user. // Since a Macro might contain thing thats related to the culture of the "IPublishedContent" (ie Dictionary keys) we want - // to set the current culture to the culture related to the content item. This is hacky but it works. - - // fixme - // in a 1:1 situation we do not handle the language being edited - // so the macro renders in the wrong language - - var culture = DomainUtilities.GetCultureFromDomains(publishedContent.Id, publishedContent.Path, null, + // to set the current culture to the currently edited culture with fallback to the culture related to the content item. + var culture = Request.ClientCulture() ?? DomainUtilities.GetCultureFromDomains(publishedContent.Id, publishedContent.Path, null, umbracoContext, _siteDomainHelper); if (culture != null) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js index 9a116beb5a..41d40a4615 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbgroupsbuilder.directive.js @@ -158,6 +158,9 @@ items: ".umb-group-builder__property-sortable", stop: (e, ui) => { updatePropertiesSortOrder(); + + // when a property is dropped we need to reset the requested tab hover alias + scope.sortableRequestedTabAlias = undefined; } }; diff --git a/src/Umbraco.Web.UI.Client/src/less/listview.less b/src/Umbraco.Web.UI.Client/src/less/listview.less index 736fc99f85..2fc6286c94 100644 --- a/src/Umbraco.Web.UI.Client/src/less/listview.less +++ b/src/Umbraco.Web.UI.Client/src/less/listview.less @@ -153,8 +153,10 @@ .umb-minilistview { .umb-table-row.not-allowed { + cursor: not-allowed; + .umb-minilistview__fade-not-allowed { opacity: 0.6; - cursor: not-allowed; + } } div.umb-mini-list-view__breadcrumb { diff --git a/src/Umbraco.Web.UI.Client/src/views/components/blockcard/umbBlockCard.component.js b/src/Umbraco.Web.UI.Client/src/views/components/blockcard/umbBlockCard.component.js index bb4c8c2a08..6d6872c1e7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/blockcard/umbBlockCard.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/components/blockcard/umbBlockCard.component.js @@ -30,7 +30,11 @@ }; vm.$onChanges = function () { - vm.icon = vm.elementTypeModel ? vm.elementTypeModel.icon.split(" ")[0] : 'icon-block'; + vm.icon = vm.elementTypeModel ? vm.elementTypeModel.icon : 'icon-block'; + if (vm.blockConfigModel.iconColor) { + // enforce configured icon color for catalogue appearance instead of icon color from element type + vm.icon = vm.icon.split(" ")[0]; + } }; vm.$onDestroy = function () { diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-mini-list-view.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-mini-list-view.html index c3b752ea49..c8b63fe0fc 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-mini-list-view.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-mini-list-view.html @@ -64,12 +64,12 @@ ng-class="{'-selected':child.selected, 'not-allowed':!child.allowed}">
-   - +   +
-
{{ child.name }}
+
{{ child.name }}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js index 812a461aee..308673bf21 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.controller.js @@ -64,7 +64,6 @@ function onInit() { vm.variants = $scope.model.variants; vm.availableVariants = vm.variants.filter(saveableVariantFilter); - vm.isNew = vm.variants.some(variant => variant.state === 'NotCreated'); if (!$scope.model.title) { localizationService.localize("content_readyToSave").then(value => { @@ -78,7 +77,7 @@ variant.save = variant.publish = false; variant.isMandatory = isMandatoryFilter(variant); - if(vm.isNew && hasAnyData(variant) && allowUpdate(variant)) { + if(variant.state === 'NotCreated' && hasAnyData(variant) && allowUpdate(variant)) { variant.save = true; } }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html index a13826b86b..6463f41b37 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html @@ -31,7 +31,7 @@