From b1eebdd598a9cdd2162ccf248dd27bbbc04c1b54 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Fri, 15 Jan 2021 20:19:35 +0100 Subject: [PATCH 01/15] Add back icon name in class attribute to work again with font icons (cherry picked from commit c1ebfc58cf3c57d62bc71a13e6a722191f758acd) --- .../src/views/components/umb-node-preview.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html index a7daa57775..34fb4d7dfd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html @@ -1,6 +1,6 @@
- +
From 6a8c2a0a5598bec239a68633ba70949211f833ce Mon Sep 17 00:00:00 2001 From: Nik Date: Tue, 19 Jan 2021 16:29:13 +0000 Subject: [PATCH 02/15] =?UTF-8?q?[AMEND]=20Updated=20the=20redirect=20URL?= =?UTF-8?q?=20Repository=20to=20search=20for=20entries=20wit=E2=80=A6=20(#?= =?UTF-8?q?9653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nik Rimington (cherry picked from commit aa5470a801107de2046454612f42bc02f9672099) --- .../Implement/RedirectUrlRepository.cs | 29 +++++---- .../Integration/ContentEventsTests.cs | 2 +- .../Services/ContentServiceTests.cs | 14 ++--- .../Services/EntityServiceTests.cs | 6 +- .../Services/RedirectUrlServiceTests.cs | 61 +++++++++++++------ .../Services/TestWithSomeContentBase.cs | 3 + 6 files changed, 72 insertions(+), 43 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs index 95aa0a8461..24c1e31c20 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs @@ -167,6 +167,23 @@ JOIN umbracoNode ON umbracoRedirectUrl.contentKey=umbracoNode.uniqueID"); return dto == null ? null : Map(dto); } + public IRedirectUrl GetMostRecentUrl(string url, string culture) + { + if (string.IsNullOrWhiteSpace(culture)) return GetMostRecentUrl(url); + var urlHash = url.GenerateHash(); + var sql = GetBaseQuery(false) + .Where(x => x.Url == url && x.UrlHash == urlHash && + (x.Culture == culture.ToLower() || x.Culture == string.Empty)) + .OrderByDescending(x => x.CreateDateUtc); + var dtos = Database.Fetch(sql); + var dto = dtos.FirstOrDefault(f => f.Culture == culture.ToLower()); + + if (dto == null) + dto = dtos.FirstOrDefault(f => f.Culture == string.Empty); + + return dto == null ? null : Map(dto); + } + public IEnumerable GetContentUrls(Guid contentKey) { var sql = GetBaseQuery(false) @@ -208,17 +225,5 @@ JOIN umbracoNode ON umbracoRedirectUrl.contentKey=umbracoNode.uniqueID"); var rules = result.Items.Select(Map); return rules; } - - public IRedirectUrl GetMostRecentUrl(string url, string culture) - { - if (string.IsNullOrWhiteSpace(culture)) return GetMostRecentUrl(url); - var urlHash = url.GenerateHash(); - var sql = GetBaseQuery(false) - .Where(x => x.Url == url && x.UrlHash == urlHash && x.Culture == culture.ToLower()) - .OrderByDescending(x => x.CreateDateUtc); - var dtos = Database.Fetch(sql); - var dto = dtos.FirstOrDefault(); - return dto == null ? null : Map(dto); - } } } diff --git a/src/Umbraco.Tests/Integration/ContentEventsTests.cs b/src/Umbraco.Tests/Integration/ContentEventsTests.cs index 7f103e13e4..af8ebe626e 100644 --- a/src/Umbraco.Tests/Integration/ContentEventsTests.cs +++ b/src/Umbraco.Tests/Integration/ContentEventsTests.cs @@ -2171,7 +2171,7 @@ namespace Umbraco.Tests.Integration [Test] public void HasInitialContent() { - Assert.AreEqual(4, ServiceContext.ContentService.Count()); + Assert.AreEqual(5, ServiceContext.ContentService.Count()); } #endregion diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index bfbb9a0d95..008c24fcbf 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -343,7 +343,7 @@ namespace Umbraco.Tests.Services } // Assert - Assert.AreEqual(24, contentService.Count()); + Assert.AreEqual(25, contentService.Count()); } [Test] @@ -1415,7 +1415,7 @@ namespace Umbraco.Tests.Services { // Arrange var contentService = ServiceContext.ContentService; - var content = contentService.GetById(NodeDto.NodeIdSeed + 5); + var content = contentService.GetById(NodeDto.NodeIdSeed + 6); // Act var published = contentService.SaveAndPublish(content, userId: Constants.Security.SuperUserId); @@ -1687,7 +1687,7 @@ namespace Umbraco.Tests.Services Assert.AreNotEqual(-20, content.ParentId); Assert.IsFalse(content.Trashed); - Assert.AreEqual(3, descendants.Count); + Assert.AreEqual(4, descendants.Count); Assert.IsFalse(descendants.Any(x => x.Path.StartsWith("-1,-20,"))); Assert.IsFalse(descendants.Any(x => x.Trashed)); @@ -1700,7 +1700,7 @@ namespace Umbraco.Tests.Services Assert.AreEqual(-20, content.ParentId); Assert.IsTrue(content.Trashed); - Assert.AreEqual(3, descendants.Count); + Assert.AreEqual(4, descendants.Count); Assert.IsTrue(descendants.All(x => x.Path.StartsWith("-1,-20,"))); Assert.True(descendants.All(x => x.Trashed)); @@ -1987,7 +1987,7 @@ namespace Umbraco.Tests.Services var contentService = ServiceContext.ContentService; var temp = contentService.GetById(NodeDto.NodeIdSeed + 2); Assert.AreEqual("Home", temp.Name); - Assert.AreEqual(2, contentService.CountChildren(temp.Id)); + Assert.AreEqual(3, contentService.CountChildren(temp.Id)); // Act var copy = contentService.Copy(temp, temp.ParentId, false, true, Constants.Security.SuperUserId); @@ -1997,7 +1997,7 @@ namespace Umbraco.Tests.Services Assert.That(copy, Is.Not.Null); Assert.That(copy.Id, Is.Not.EqualTo(content.Id)); Assert.AreNotSame(content, copy); - Assert.AreEqual(2, contentService.CountChildren(copy.Id)); + Assert.AreEqual(3, contentService.CountChildren(copy.Id)); var child = contentService.GetById(NodeDto.NodeIdSeed + 3); var childCopy = contentService.GetPagedChildren(copy.Id, 0, 500, out var total).First(); @@ -2013,7 +2013,7 @@ namespace Umbraco.Tests.Services var contentService = ServiceContext.ContentService; var temp = contentService.GetById(NodeDto.NodeIdSeed + 2); Assert.AreEqual("Home", temp.Name); - Assert.AreEqual(2, contentService.CountChildren(temp.Id)); + Assert.AreEqual(3, contentService.CountChildren(temp.Id)); // Act var copy = contentService.Copy(temp, temp.ParentId, false, false, Constants.Security.SuperUserId); diff --git a/src/Umbraco.Tests/Services/EntityServiceTests.cs b/src/Umbraco.Tests/Services/EntityServiceTests.cs index 75f3662ee2..4b83407e63 100644 --- a/src/Umbraco.Tests/Services/EntityServiceTests.cs +++ b/src/Umbraco.Tests/Services/EntityServiceTests.cs @@ -477,7 +477,7 @@ namespace Umbraco.Tests.Services var entities = service.GetAll(UmbracoObjectTypes.Document).ToArray(); Assert.That(entities.Any(), Is.True); - Assert.That(entities.Length, Is.EqualTo(4)); + Assert.That(entities.Length, Is.EqualTo(5)); Assert.That(entities.Any(x => x.Trashed), Is.True); } @@ -490,7 +490,7 @@ namespace Umbraco.Tests.Services var entities = service.GetAll(objectTypeId).ToArray(); Assert.That(entities.Any(), Is.True); - Assert.That(entities.Length, Is.EqualTo(4)); + Assert.That(entities.Length, Is.EqualTo(5)); Assert.That(entities.Any(x => x.Trashed), Is.True); } @@ -502,7 +502,7 @@ namespace Umbraco.Tests.Services var entities = service.GetAll().ToArray(); Assert.That(entities.Any(), Is.True); - Assert.That(entities.Length, Is.EqualTo(4)); + Assert.That(entities.Length, Is.EqualTo(5)); Assert.That(entities.Any(x => x.Trashed), Is.True); } diff --git a/src/Umbraco.Tests/Services/RedirectUrlServiceTests.cs b/src/Umbraco.Tests/Services/RedirectUrlServiceTests.cs index 1344b1661b..437de3ac5b 100644 --- a/src/Umbraco.Tests/Services/RedirectUrlServiceTests.cs +++ b/src/Umbraco.Tests/Services/RedirectUrlServiceTests.cs @@ -1,13 +1,10 @@ -using System; +using Moq; +using NUnit.Framework; using System.Linq; using System.Threading; -using Moq; -using NUnit.Framework; using Umbraco.Core.Cache; using Umbraco.Core.Logging; using Umbraco.Core.Models; - -using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.Repositories.Implement; using Umbraco.Core.Scoping; using Umbraco.Tests.Testing; @@ -19,11 +16,14 @@ namespace Umbraco.Tests.Services [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] public class RedirectUrlServiceTests : TestWithSomeContentBase { - private IContent _testPage; - private IContent _altTestPage; - private string _url = "blah"; - private string _cultureA = "en"; - private string _cultureB = "de"; + private IContent _firstSubPage; + private IContent _secondSubPage; + private IContent _thirdSubPage; + private readonly string _url = "blah"; + private readonly string _urlAlt = "alternativeUrl"; + private readonly string _cultureEnglish = "en"; + private readonly string _cultureGerman = "de"; + private readonly string _unusedCulture = "es"; public override void CreateTestData() { base.CreateTestData(); @@ -33,22 +33,34 @@ namespace Umbraco.Tests.Services { var repository = new RedirectUrlRepository((IScopeAccessor)provider, AppCaches.Disabled, Mock.Of()); var rootContent = ServiceContext.ContentService.GetRootContent().FirstOrDefault(); - var subPages = ServiceContext.ContentService.GetPagedChildren(rootContent.Id, 0, 2, out _).ToList(); - _testPage = subPages[0]; - _altTestPage = subPages[1]; + var subPages = ServiceContext.ContentService.GetPagedChildren(rootContent.Id, 0, 3, out _).ToList(); + _firstSubPage = subPages[0]; + _secondSubPage = subPages[1]; + _thirdSubPage = subPages[2]; + + repository.Save(new RedirectUrl { - ContentKey = _testPage.Key, + ContentKey = _firstSubPage.Key, Url = _url, - Culture = _cultureA + Culture = _cultureEnglish }); + Thread.Sleep(1000); //Added delay to ensure timestamp difference as sometimes they seem to have the same timestamp repository.Save(new RedirectUrl { - ContentKey = _altTestPage.Key, + ContentKey = _secondSubPage.Key, Url = _url, - Culture = _cultureB + Culture = _cultureGerman }); + Thread.Sleep(1000); + repository.Save(new RedirectUrl + { + ContentKey = _thirdSubPage.Key, + Url = _urlAlt, + Culture = string.Empty + }); + scope.Complete(); } } @@ -64,7 +76,7 @@ namespace Umbraco.Tests.Services { var redirectUrlService = ServiceContext.RedirectUrlService; var redirect = redirectUrlService.GetMostRecentRedirectUrl(_url); - Assert.AreEqual(redirect.ContentId, _altTestPage.Id); + Assert.AreEqual(redirect.ContentId, _secondSubPage.Id); } @@ -72,8 +84,17 @@ namespace Umbraco.Tests.Services public void Can_Get_Most_Recent_RedirectUrl_With_Culture() { var redirectUrlService = ServiceContext.RedirectUrlService; - var redirect = redirectUrlService.GetMostRecentRedirectUrl(_url, _cultureA); - Assert.AreEqual(redirect.ContentId, _testPage.Id); + var redirect = redirectUrlService.GetMostRecentRedirectUrl(_url, _cultureEnglish); + Assert.AreEqual(redirect.ContentId, _firstSubPage.Id); + + } + + [Test] + public void Can_Get_Most_Recent_RedirectUrl_With_Culture_When_No_CultureVariant_Exists() + { + var redirectUrlService = ServiceContext.RedirectUrlService; + var redirect = redirectUrlService.GetMostRecentRedirectUrl(_urlAlt, _unusedCulture); + Assert.AreEqual(redirect.ContentId, _thirdSubPage.Id); } diff --git a/src/Umbraco.Tests/Services/TestWithSomeContentBase.cs b/src/Umbraco.Tests/Services/TestWithSomeContentBase.cs index 2b313afc5c..6daa16470b 100644 --- a/src/Umbraco.Tests/Services/TestWithSomeContentBase.cs +++ b/src/Umbraco.Tests/Services/TestWithSomeContentBase.cs @@ -41,6 +41,9 @@ namespace Umbraco.Tests.Services Content subpage2 = MockedContent.CreateSimpleContent(contentType, "Text Page 2", textpage.Id); ServiceContext.ContentService.Save(subpage2, 0); + Content subpage3 = MockedContent.CreateSimpleContent(contentType, "Text Page 3", textpage.Id); + ServiceContext.ContentService.Save(subpage3, 0); + //Create and Save Content "Text Page Deleted" based on "umbTextpage" -> 1064 Content trashed = MockedContent.CreateSimpleContent(contentType, "Text Page Deleted", -20); trashed.Trashed = true; From b75a237162d23c16b9090a5819e63eb371b1bb24 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 20 Jan 2021 10:04:54 +0100 Subject: [PATCH 03/15] Fixes: 9360: Nested validation freezes browser (#9677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Niels Lyngsø --- .../common/services/angularhelper.service.js | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js index 7e7f804656..36ce4541f1 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js @@ -11,6 +11,11 @@ function angularHelper($q) { var requiredFormProps = ["$error", "$name", "$dirty", "$pristine", "$valid", "$submitted", "$pending"]; function collectAllFormErrorsRecursively(formCtrl, allErrors) { + // skip if the control is already added to the array + if (allErrors.indexOf(formCtrl) !== -1) { + return; + } + // loop over the error dictionary (see https://docs.angularjs.org/api/ng/type/form.FormController#$error) var keys = Object.keys(formCtrl.$error); if (keys.length === 0) { @@ -31,6 +36,7 @@ function angularHelper($q) { allErrors.push(ctrl); // add the error return; } + // recurse with the sub form collectAllFormErrorsRecursively(ctrl, allErrors); } @@ -43,6 +49,7 @@ function angularHelper($q) { } function isForm(obj) { + // a method to check that the collection of object prop names contains the property name expected function allPropertiesExist(objectPropNames) { //ensure that every required property name exists on the current object @@ -89,9 +96,9 @@ function angularHelper($q) { /** * Method used to re-run the $parsers for a given ngModel - * @param {} scope - * @param {} ngModel - * @returns {} + * @param {} scope + * @param {} ngModel + * @returns {} */ revalidateNgModel: function (scope, ngModel) { this.safeApply(scope, function() { @@ -103,8 +110,8 @@ function angularHelper($q) { /** * Execute a list of promises sequentially. Unlike $q.all which executes all promises at once, this will execute them in sequence. - * @param {} promises - * @returns {} + * @param {} promises + * @returns {} */ executeSequentialPromises: function (promises) { @@ -178,7 +185,7 @@ function angularHelper($q) { //NOTE: There isn't a way in angular to get a reference to the current form object since the form object // is just defined as a property of the scope when it is named but you'll always need to know the name which // isn't very convenient. If we want to watch for validation changes we need to get a form reference. - // The way that we detect the form object is a bit hackerific in that we detect all of the required properties + // The way that we detect the form object is a bit hackerific in that we detect all of the required properties // that exist on a form object. // //The other way to do it in a directive is to require "^form", but in a controller the only other way to do it @@ -239,7 +246,7 @@ function angularHelper($q) { $submitted: false, $pending: undefined, $addControl: Utilities.noop, - $removeControl: Utilities.noop, + $removeControl: Utilities.noop, $setValidity: Utilities.noop, $setDirty: Utilities.noop, $setPristine: Utilities.noop, From 2321fbfcabec653a8e9ca71c19be4e7e2127374d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 20 Jan 2021 10:15:52 +0100 Subject: [PATCH 04/15] empty value should also enable in order to stay backwards compatible. --- .../forms/umbautofocus.directive.js | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js index 47ef460c53..98c4ef691e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js @@ -10,18 +10,14 @@ angular.module("umbraco.directives") } }; - //check if there's a value for the attribute, if there is and it's false then we conditionally don't - //use auto focus. - if (attrs.umbAutoFocus) { - attrs.$observe("umbAutoFocus", function (newVal) { - var enabled = (newVal === "false" || newVal === 0 || newVal === false) ? false : true; - if (enabled) { - $timeout(function() { - update(); - }); - } - }); - } + attrs.$observe("umbAutoFocus", function (newVal) { + var enabled = (newVal === "false" || newVal === 0 || newVal === false) ? false : true; + if (enabled) { + $timeout(function() { + update(); + }); + } + }); }; }); From b6558cf73449439cffc4cc82fa285b96ad937b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 20 Jan 2021 10:15:52 +0100 Subject: [PATCH 05/15] empty value should also enable in order to stay backwards compatible. (cherry picked from commit 2321fbfcabec653a8e9ca71c19be4e7e2127374d) --- .../forms/umbautofocus.directive.js | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js index 47ef460c53..98c4ef691e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbautofocus.directive.js @@ -10,18 +10,14 @@ angular.module("umbraco.directives") } }; - //check if there's a value for the attribute, if there is and it's false then we conditionally don't - //use auto focus. - if (attrs.umbAutoFocus) { - attrs.$observe("umbAutoFocus", function (newVal) { - var enabled = (newVal === "false" || newVal === 0 || newVal === false) ? false : true; - if (enabled) { - $timeout(function() { - update(); - }); - } - }); - } + attrs.$observe("umbAutoFocus", function (newVal) { + var enabled = (newVal === "false" || newVal === 0 || newVal === false) ? false : true; + if (enabled) { + $timeout(function() { + update(); + }); + } + }); }; }); From 704fad92e5d7eee1db0c8016f6f104c374ead8b8 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 20 Jan 2021 10:04:54 +0100 Subject: [PATCH 06/15] Fixes: 9360: Nested validation freezes browser (#9677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Niels Lyngsø (cherry picked from commit b75a237162d23c16b9090a5819e63eb371b1bb24) --- .../common/services/angularhelper.service.js | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js index fd620bac18..7c291ffb3f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/angularhelper.service.js @@ -11,6 +11,11 @@ function angularHelper($q) { var requiredFormProps = ["$error", "$name", "$dirty", "$pristine", "$valid", "$submitted", "$pending"]; function collectAllFormErrorsRecursively(formCtrl, allErrors) { + // skip if the control is already added to the array + if (allErrors.indexOf(formCtrl) !== -1) { + return; + } + // loop over the error dictionary (see https://docs.angularjs.org/api/ng/type/form.FormController#$error) var keys = Object.keys(formCtrl.$error); if (keys.length === 0) { @@ -31,6 +36,7 @@ function angularHelper($q) { allErrors.push(ctrl); // add the error return; } + // recurse with the sub form collectAllFormErrorsRecursively(ctrl, allErrors); } @@ -43,6 +49,7 @@ function angularHelper($q) { } function isForm(obj) { + // a method to check that the collection of object prop names contains the property name expected function allPropertiesExist(objectPropNames) { //ensure that every required property name exists on the current object @@ -89,9 +96,9 @@ function angularHelper($q) { /** * Method used to re-run the $parsers for a given ngModel - * @param {} scope - * @param {} ngModel - * @returns {} + * @param {} scope + * @param {} ngModel + * @returns {} */ revalidateNgModel: function (scope, ngModel) { this.safeApply(scope, function() { @@ -103,8 +110,8 @@ function angularHelper($q) { /** * Execute a list of promises sequentially. Unlike $q.all which executes all promises at once, this will execute them in sequence. - * @param {} promises - * @returns {} + * @param {} promises + * @returns {} */ executeSequentialPromises: function (promises) { @@ -178,7 +185,7 @@ function angularHelper($q) { //NOTE: There isn't a way in angular to get a reference to the current form object since the form object // is just defined as a property of the scope when it is named but you'll always need to know the name which // isn't very convenient. If we want to watch for validation changes we need to get a form reference. - // The way that we detect the form object is a bit hackerific in that we detect all of the required properties + // The way that we detect the form object is a bit hackerific in that we detect all of the required properties // that exist on a form object. // //The other way to do it in a directive is to require "^form", but in a controller the only other way to do it @@ -239,7 +246,7 @@ function angularHelper($q) { $submitted: false, $pending: undefined, $addControl: Utilities.noop, - $removeControl: Utilities.noop, + $removeControl: Utilities.noop, $setValidity: Utilities.noop, $setDirty: Utilities.noop, $setPristine: Utilities.noop, From 0744b38fe4f8b15e3fdc460261d8e28d24906f65 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jan 2021 11:16:28 +0100 Subject: [PATCH 07/15] Fixes umbraco/Umbraco-CMS#9244 Log a warning instead of throwing an error so existing code doesn't fail --- src/Umbraco.Core/Services/Implement/UserService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Core/Services/Implement/UserService.cs index e4906863fa..41424e1dda 100644 --- a/src/Umbraco.Core/Services/Implement/UserService.cs +++ b/src/Umbraco.Core/Services/Implement/UserService.cs @@ -205,7 +205,7 @@ namespace Umbraco.Core.Services.Implement //NOTE: this will not be cached return _userRepository.GetByUsername(username, includeSecurityData: false); } - + throw; } } @@ -258,7 +258,7 @@ namespace Umbraco.Core.Services.Implement // this method must exist in this service as an implementation (legacy) void IMembershipMemberService.SetLastLogin(string username, DateTime date) { - throw new NotSupportedException("This method is not implemented or supported for users"); + Logger.Warn("This method is not implemented. Using membership providers users is not advised, use ASP.NET Identity instead. See issue #9224 for more information."); } /// @@ -717,7 +717,7 @@ namespace Umbraco.Core.Services.Implement //NOTE: this will not be cached return _userRepository.Get(id, includeSecurityData: false); } - + throw; } } From e18bda50a10e94ba5eb870ba65eb36426d3e8bac Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jan 2021 11:18:18 +0100 Subject: [PATCH 08/15] Bump version to 8.6.7 --- src/SolutionInfo.cs | 6 +++--- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index 687030ad13..b5fb5fdd77 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -2,7 +2,7 @@ using System.Resources; [assembly: AssemblyCompany("Umbraco")] -[assembly: AssemblyCopyright("Copyright © Umbraco 2020")] +[assembly: AssemblyCopyright("Copyright © Umbraco 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -18,5 +18,5 @@ using System.Resources; [assembly: AssemblyVersion("8.0.0")] // these are FYI and changed automatically -[assembly: AssemblyFileVersion("8.6.6")] -[assembly: AssemblyInformationalVersion("8.6.6")] +[assembly: AssemblyFileVersion("8.6.7")] +[assembly: AssemblyInformationalVersion("8.6.7")] diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index e8c31f4665..bb36aeb8c2 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -345,9 +345,9 @@ False True - 8660 + 8670 / - http://localhost:8660 + http://localhost:8670 False False From b44a3e42804c562475d50fc4da11f6b038e152cc Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 19 Jan 2021 18:17:48 +0100 Subject: [PATCH 09/15] Inject missing localization service (cherry picked from commit c501ef0b68f135811ca9000e4f091c53851b5db4) --- .../directives/components/forms/umbradiobutton.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbradiobutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbradiobutton.directive.js index 7ed84547f1..f8a3fd2d2e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbradiobutton.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/umbradiobutton.directive.js @@ -36,7 +36,7 @@ (function () { 'use strict'; - function UmbRadiobuttonController($timeout) { + function UmbRadiobuttonController($timeout, localizationService) { var vm = this; From 0b3256c4feb8124b00cd461eabaca323415b851d Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jan 2021 11:24:28 +0100 Subject: [PATCH 10/15] Bump version to 8.7.2 --- src/SolutionInfo.cs | 6 +++--- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index 087e5a3a55..597b416ffb 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -2,7 +2,7 @@ using System.Resources; [assembly: AssemblyCompany("Umbraco")] -[assembly: AssemblyCopyright("Copyright © Umbraco 2020")] +[assembly: AssemblyCopyright("Copyright © Umbraco 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -18,5 +18,5 @@ using System.Resources; [assembly: AssemblyVersion("8.0.0")] // these are FYI and changed automatically -[assembly: AssemblyFileVersion("8.7.1")] -[assembly: AssemblyInformationalVersion("8.7.1")] +[assembly: AssemblyFileVersion("8.7.2")] +[assembly: AssemblyInformationalVersion("8.7.2")] diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index eb3159fa43..63b392b5e5 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -346,9 +346,9 @@ False True - 8710 + 8720 / - http://localhost:8710 + http://localhost:8720 8660 / http://localhost:8660 From cda81ae9be18f99f99b905a2616edeead6aafa7b Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jan 2021 11:26:14 +0100 Subject: [PATCH 11/15] Bump version to 8.8.3 --- src/SolutionInfo.cs | 6 +++--- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index 9ea8419e15..284aa24629 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -2,7 +2,7 @@ using System.Resources; [assembly: AssemblyCompany("Umbraco")] -[assembly: AssemblyCopyright("Copyright © Umbraco 2020")] +[assembly: AssemblyCopyright("Copyright © Umbraco 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -18,5 +18,5 @@ using System.Resources; [assembly: AssemblyVersion("8.0.0")] // these are FYI and changed automatically -[assembly: AssemblyFileVersion("8.8.2")] -[assembly: AssemblyInformationalVersion("8.8.2")] +[assembly: AssemblyFileVersion("8.8.3")] +[assembly: AssemblyInformationalVersion("8.8.3")] diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 5ff224f449..c104514cb1 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -346,9 +346,9 @@ False True - 8820 + 8830 / - http://localhost:8820 + http://localhost:8830 False False From e913c2720c987daec757ab54ca6bf83a74603bd0 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jan 2021 11:27:40 +0100 Subject: [PATCH 12/15] Bump version to 8.9.2 --- src/SolutionInfo.cs | 6 +++--- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index 1c59137aac..eeeb9b41ff 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -2,7 +2,7 @@ using System.Resources; [assembly: AssemblyCompany("Umbraco")] -[assembly: AssemblyCopyright("Copyright © Umbraco 2020")] +[assembly: AssemblyCopyright("Copyright © Umbraco 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -18,5 +18,5 @@ using System.Resources; [assembly: AssemblyVersion("8.0.0")] // these are FYI and changed automatically -[assembly: AssemblyFileVersion("8.9.1")] -[assembly: AssemblyInformationalVersion("8.9.1")] +[assembly: AssemblyFileVersion("8.9.2")] +[assembly: AssemblyInformationalVersion("8.9.2")] diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 8ea1fd87b7..ce4153f81b 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -346,9 +346,9 @@ False True - 8910 + 8920 / - http://localhost:8910 + http://localhost:8920 False False From ae30a8db91f9c6bdc097fb8d0dc80d760c10e7c9 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jan 2021 11:29:04 +0100 Subject: [PATCH 13/15] Bump version to 8.10.2 --- src/SolutionInfo.cs | 4 ++-- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index b1fdd967e4..3b88bba754 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -18,5 +18,5 @@ using System.Resources; [assembly: AssemblyVersion("8.0.0")] // these are FYI and changed automatically -[assembly: AssemblyFileVersion("8.10.1")] -[assembly: AssemblyInformationalVersion("8.10.1")] +[assembly: AssemblyFileVersion("8.10.2")] +[assembly: AssemblyInformationalVersion("8.10.2")] diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 22a7e4356f..7338038359 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -347,9 +347,9 @@ False True - 8101 + 8102 / - http://localhost:8101 + http://localhost:8102 False False From 120dbd358e2e075f82a4aa0baf61bf42c7418d84 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Jan 2021 11:30:07 +0100 Subject: [PATCH 14/15] Bump version to 8.11.0 --- src/SolutionInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index c99c029d74..2110ddf4e0 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -19,4 +19,4 @@ using System.Resources; // these are FYI and changed automatically [assembly: AssemblyFileVersion("8.11.0")] -[assembly: AssemblyInformationalVersion("8.11.0-rc")] +[assembly: AssemblyInformationalVersion("8.11.0")] From ad7981246e8bd3680a60a1075129db34ff844a63 Mon Sep 17 00:00:00 2001 From: berg Date: Wed, 20 Jan 2021 16:45:19 +0100 Subject: [PATCH 15/15] Fix test --- .../Umbraco.Infrastructure/Services/ContentEventsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs index aaaa73416f..1a2f39f51f 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs @@ -2009,7 +2009,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services } [Test] - public void HasInitialContent() => Assert.AreEqual(4, ContentService.Count()); + public void HasInitialContent() => Assert.AreEqual(5, ContentService.Count()); #endregion