From 24abc117fe5db9fda5dc2badea49ffcd9235971f Mon Sep 17 00:00:00 2001 From: Zeegaan Date: Fri, 7 Jun 2024 12:50:46 +0200 Subject: [PATCH 1/9] update version.json --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 288af47e08..b9fa941e03 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "13.5.0-rc", + "version": "13.4.0", "assemblyVersion": { "precision": "build" }, From 82b4f506c28909f6e66de050cf46589189ac89e0 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:08:40 +0200 Subject: [PATCH 2/9] bump version to rc2 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index b9fa941e03..800c209374 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "13.4.0", + "version": "13.4.0-rc2", "assemblyVersion": { "precision": "build" }, From 344245b1ea2af41ae43b04c1c54cbb9c899b844a Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:05:36 +0200 Subject: [PATCH 3/9] bump to final version --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 800c209374..b9fa941e03 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "13.4.0-rc2", + "version": "13.4.0", "assemblyVersion": { "precision": "build" }, From a686ba2a0ed97cb0f818e532bc84dbd179c4c027 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Wed, 19 Jun 2024 07:50:52 +0200 Subject: [PATCH 4/9] V13: Update nuget packages (#16616) * Update nuget packages * Fix Imagesharp 2 --------- Co-authored-by: Bjarke Berg --- Directory.Packages.props | 48 +++++++++---------- .../Umbraco.Cms.Imaging.ImageSharp.csproj | 2 +- .../Umbraco.Cms.Imaging.ImageSharp2.csproj | 4 +- .../Umbraco.PublishedCache.NuCache.csproj | 4 +- .../Umbraco.Web.Common.csproj | 2 +- 5 files changed, 29 insertions(+), 31 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 02dbaba948..ccd1e91a2e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,25 +12,25 @@ - - + + - - - - + + + + - + - - + + - + @@ -45,13 +45,13 @@ - - - - - + + + + + - + @@ -73,21 +73,21 @@ - - - - - + + + + + - + - + - + \ No newline at end of file diff --git a/src/Umbraco.Cms.Imaging.ImageSharp/Umbraco.Cms.Imaging.ImageSharp.csproj b/src/Umbraco.Cms.Imaging.ImageSharp/Umbraco.Cms.Imaging.ImageSharp.csproj index 13126a24b5..549ea5cb40 100644 --- a/src/Umbraco.Cms.Imaging.ImageSharp/Umbraco.Cms.Imaging.ImageSharp.csproj +++ b/src/Umbraco.Cms.Imaging.ImageSharp/Umbraco.Cms.Imaging.ImageSharp.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Umbraco.Cms.Imaging.ImageSharp2/Umbraco.Cms.Imaging.ImageSharp2.csproj b/src/Umbraco.Cms.Imaging.ImageSharp2/Umbraco.Cms.Imaging.ImageSharp2.csproj index 43bf47cb75..724c5b5e34 100644 --- a/src/Umbraco.Cms.Imaging.ImageSharp2/Umbraco.Cms.Imaging.ImageSharp2.csproj +++ b/src/Umbraco.Cms.Imaging.ImageSharp2/Umbraco.Cms.Imaging.ImageSharp2.csproj @@ -5,10 +5,8 @@ - + - - diff --git a/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj b/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj index 75dfa13ec6..92f222525c 100644 --- a/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj +++ b/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj @@ -7,10 +7,10 @@ - + - + diff --git a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj index 02a039a6db..b0b5f2af6a 100644 --- a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj +++ b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj @@ -12,7 +12,7 @@ - + From 00ca9e0d2dbfb9c8a75fd8cfc00ca272ae18efbe Mon Sep 17 00:00:00 2001 From: Mole Date: Thu, 20 Jun 2024 11:25:02 +0200 Subject: [PATCH 5/9] V13: Eaglery route domains for virtual page controllers (#16635) * Do domain routing eagerly * Cleanup * Fix comment --- .../Routing/EagerMatcherPolicy.cs | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs b/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs index bb5cb52a4d..b6cd4a3615 100644 --- a/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs +++ b/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs @@ -8,7 +8,9 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Routing; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; using Umbraco.Cms.Web.Common.Controllers; +using Umbraco.Cms.Web.Common.Routing; using Umbraco.Cms.Web.Website.Controllers; using Umbraco.Extensions; @@ -37,6 +39,8 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy private readonly IRuntimeState _runtimeState; private readonly EndpointDataSource _endpointDataSource; private readonly UmbracoRequestPaths _umbracoRequestPaths; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; + private readonly IPublishedRouter _publishedRouter; private GlobalSettings _globalSettings; private readonly Lazy _installEndpoint; private readonly Lazy _renderEndpoint; @@ -45,11 +49,15 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy IRuntimeState runtimeState, EndpointDataSource endpointDataSource, UmbracoRequestPaths umbracoRequestPaths, - IOptionsMonitor globalSettings) + IOptionsMonitor globalSettings, + IUmbracoContextAccessor umbracoContextAccessor, + IPublishedRouter publishedRouter) { _runtimeState = runtimeState; _endpointDataSource = endpointDataSource; _umbracoRequestPaths = umbracoRequestPaths; + _umbracoContextAccessor = umbracoContextAccessor; + _publishedRouter = publishedRouter; _globalSettings = globalSettings.CurrentValue; globalSettings.OnChange(settings => _globalSettings = settings); _installEndpoint = new Lazy(GetInstallEndpoint); @@ -112,11 +120,22 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy ControllerActionDescriptor? controllerDescriptor = routeEndpoint.Metadata.GetMetadata(); TypeInfo? controllerTypeInfo = controllerDescriptor?.ControllerTypeInfo; if (controllerTypeInfo is not null && - (controllerTypeInfo.IsType() || controllerTypeInfo.IsType())) + (controllerTypeInfo.IsType() + || controllerTypeInfo.IsType())) { return; } + // If it's an UmbracoPageController we need to do some domain routing. + // We need to do this in oder to handle cultures for our Dictionary. + // This is because UmbracoPublishedContentCultureProvider is ued to set the Thread.CurrentThread.CurrentUICulture + // The CultureProvider is run before the actual routing, this means that our UmbracoVirtualPageFilterAttribute is hit AFTER the culture is set. + // Meaning we have to route the domain part already now, this is not pretty, but it beats having to look for content we know doesn't exist. + if (controllerTypeInfo is not null && controllerTypeInfo.IsType()) + { + await RouteVirtualRequestAsync(httpContext); + } + if (routeEndpoint.Order < lowestOrder) { // We have to ensure that the route is valid for the current request method. @@ -153,6 +172,22 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy } } + private async Task RouteVirtualRequestAsync(HttpContext context) + { + if (_umbracoContextAccessor.TryGetUmbracoContext(out IUmbracoContext? umbracoContext) is false) + { + return; + } + + IPublishedRequestBuilder requestBuilder = + await _publishedRouter.CreateRequestAsync(umbracoContext.CleanedUmbracoUrl); + _publishedRouter.RouteDomain(requestBuilder); + // This is just a temporary RouteValues object just for culture which will be overwritten later + // so we can just use a dummy action descriptor. + var umbracoRouteValues = new UmbracoRouteValues(requestBuilder.Build(), new ControllerActionDescriptor()); + context.Features.Set(umbracoRouteValues); + } + /// /// Replaces the first endpoint candidate with the specified endpoint, invalidating all other candidates, /// guaranteeing that the specified endpoint will be hit. From 56710d5b5be2ecc2d09bce04168b2fdd149d7341 Mon Sep 17 00:00:00 2001 From: Mole Date: Thu, 20 Jun 2024 11:25:02 +0200 Subject: [PATCH 6/9] V13: Eaglery route domains for virtual page controllers (#16635) * Do domain routing eagerly * Cleanup * Fix comment --- .../Routing/EagerMatcherPolicy.cs | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs b/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs index bb5cb52a4d..b6cd4a3615 100644 --- a/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs +++ b/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs @@ -8,7 +8,9 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Routing; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; using Umbraco.Cms.Web.Common.Controllers; +using Umbraco.Cms.Web.Common.Routing; using Umbraco.Cms.Web.Website.Controllers; using Umbraco.Extensions; @@ -37,6 +39,8 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy private readonly IRuntimeState _runtimeState; private readonly EndpointDataSource _endpointDataSource; private readonly UmbracoRequestPaths _umbracoRequestPaths; + private readonly IUmbracoContextAccessor _umbracoContextAccessor; + private readonly IPublishedRouter _publishedRouter; private GlobalSettings _globalSettings; private readonly Lazy _installEndpoint; private readonly Lazy _renderEndpoint; @@ -45,11 +49,15 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy IRuntimeState runtimeState, EndpointDataSource endpointDataSource, UmbracoRequestPaths umbracoRequestPaths, - IOptionsMonitor globalSettings) + IOptionsMonitor globalSettings, + IUmbracoContextAccessor umbracoContextAccessor, + IPublishedRouter publishedRouter) { _runtimeState = runtimeState; _endpointDataSource = endpointDataSource; _umbracoRequestPaths = umbracoRequestPaths; + _umbracoContextAccessor = umbracoContextAccessor; + _publishedRouter = publishedRouter; _globalSettings = globalSettings.CurrentValue; globalSettings.OnChange(settings => _globalSettings = settings); _installEndpoint = new Lazy(GetInstallEndpoint); @@ -112,11 +120,22 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy ControllerActionDescriptor? controllerDescriptor = routeEndpoint.Metadata.GetMetadata(); TypeInfo? controllerTypeInfo = controllerDescriptor?.ControllerTypeInfo; if (controllerTypeInfo is not null && - (controllerTypeInfo.IsType() || controllerTypeInfo.IsType())) + (controllerTypeInfo.IsType() + || controllerTypeInfo.IsType())) { return; } + // If it's an UmbracoPageController we need to do some domain routing. + // We need to do this in oder to handle cultures for our Dictionary. + // This is because UmbracoPublishedContentCultureProvider is ued to set the Thread.CurrentThread.CurrentUICulture + // The CultureProvider is run before the actual routing, this means that our UmbracoVirtualPageFilterAttribute is hit AFTER the culture is set. + // Meaning we have to route the domain part already now, this is not pretty, but it beats having to look for content we know doesn't exist. + if (controllerTypeInfo is not null && controllerTypeInfo.IsType()) + { + await RouteVirtualRequestAsync(httpContext); + } + if (routeEndpoint.Order < lowestOrder) { // We have to ensure that the route is valid for the current request method. @@ -153,6 +172,22 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy } } + private async Task RouteVirtualRequestAsync(HttpContext context) + { + if (_umbracoContextAccessor.TryGetUmbracoContext(out IUmbracoContext? umbracoContext) is false) + { + return; + } + + IPublishedRequestBuilder requestBuilder = + await _publishedRouter.CreateRequestAsync(umbracoContext.CleanedUmbracoUrl); + _publishedRouter.RouteDomain(requestBuilder); + // This is just a temporary RouteValues object just for culture which will be overwritten later + // so we can just use a dummy action descriptor. + var umbracoRouteValues = new UmbracoRouteValues(requestBuilder.Build(), new ControllerActionDescriptor()); + context.Features.Set(umbracoRouteValues); + } + /// /// Replaces the first endpoint candidate with the specified endpoint, invalidating all other candidates, /// guaranteeing that the specified endpoint will be hit. From b2b112eb8b7964968650412313fe94e096dd3773 Mon Sep 17 00:00:00 2001 From: Andreas Zerbst <73799582+andr317c@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:49:16 +0200 Subject: [PATCH 7/9] V13 QA Updated depedencies (#16606) * Bumped version of helper and builder * Removed faker --- .../package-lock.json | 28 +++++++------------ .../Umbraco.Tests.AcceptanceTest/package.json | 5 ++-- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json index 82892582ce..e3bb3947ff 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json @@ -7,11 +7,10 @@ "name": "acceptancetest", "hasInstallScript": true, "dependencies": { - "@umbraco/json-models-builders": "^1.0.6", - "@umbraco/playwright-testhelpers": "^1.0.25", + "@umbraco/json-models-builders": "^1.0.8", + "@umbraco/playwright-testhelpers": "^1.0.28", "camelize": "^1.0.0", "dotenv": "^16.0.2", - "faker": "^4.1.0", "form-data": "^4.0.0", "node-fetch": "^2.6.7", "xhr2": "^0.2.1" @@ -122,22 +121,20 @@ "dev": true }, "node_modules/@umbraco/json-models-builders": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-1.0.6.tgz", - "integrity": "sha512-bXwfXcpuqG1Ye714L9KJEGXuSzJfckysE/6CuPjdG8FqHWTE1brv28teR2oMw+ih8ca2u2zUboRgdzLEU/1D3Q==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-1.0.8.tgz", + "integrity": "sha512-qBiOwaFO0V/hRpByBnwWe65nlNvaKNQPQj17MCiUTkCf1LxkB1T0ZoQv50vvnLFx6xUBZKfLhEXqYmoJqsQsPg==", "dependencies": { - "camelize": "^1.0.0", - "faker": "^4.1.0" + "camelize": "^1.0.0" } }, "node_modules/@umbraco/playwright-testhelpers": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.25.tgz", - "integrity": "sha512-6H452J6LhP0EHjF4jR7V7i0U8WPTiAbSyhN1J459BbbYEJ4QX1A2ZlCdA6VSBAsK1xYdMXD+yxsVJq7AAwiy9A==", + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.28.tgz", + "integrity": "sha512-AOk0eKkGV1Tyhb+iac9hyKzm2wCqwf+ELRQsiCWNVW8DxrPZiXIqQyjeI22YFuzkVJ3MJBDcoSwp7d31b1gm/w==", "dependencies": { - "@umbraco/json-models-builders": "^1.0.6", + "@umbraco/json-models-builders": "^1.0.8", "camelize": "^1.0.0", - "faker": "^4.1.0", "form-data": "^4.0.0", "node-fetch": "^2.6.7", "xhr2": "^0.2.1" @@ -323,11 +320,6 @@ "node": "> 0.1.90" } }, - "node_modules/faker": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz", - "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=" - }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", diff --git a/tests/Umbraco.Tests.AcceptanceTest/package.json b/tests/Umbraco.Tests.AcceptanceTest/package.json index adcdf64f1d..6dc84f51dc 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package.json @@ -19,10 +19,9 @@ "wait-on": "^7.2.0" }, "dependencies": { - "@umbraco/json-models-builders": "^1.0.6", - "@umbraco/playwright-testhelpers": "^1.0.25", + "@umbraco/json-models-builders": "^1.0.8", + "@umbraco/playwright-testhelpers": "^1.0.28", "camelize": "^1.0.0", - "faker": "^4.1.0", "form-data": "^4.0.0", "node-fetch": "^2.6.7", "xhr2": "^0.2.1", From 6e3a6917c8264b51caf7d3bf56907caeec0f223e Mon Sep 17 00:00:00 2001 From: Andreas Zerbst <73799582+andr317c@users.noreply.github.com> Date: Wed, 19 Jun 2024 09:49:04 +0200 Subject: [PATCH 8/9] Decreased to 1 retry for this file only (#16623) --- .../tests/DefaultConfig/Tour/tours.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts index f5974db43d..03bbe86c78 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tour/tours.spec.ts @@ -3,6 +3,7 @@ import {test} from '@umbraco/playwright-testhelpers'; test.describe('Tours', () => { const timeout = 60000; + test.describe.configure({ retries: 1 }); test.beforeEach(async ({ page, umbracoApi }, testInfo) => { await umbracoApi.report.report(testInfo); await umbracoApi.login(); @@ -100,4 +101,4 @@ test.describe('Tours', () => { await expect(await umbracoUi.getGlobalHelp()).toBeVisible(); await getPercentage(17, timeout, page); }); -}); \ No newline at end of file +}); From e3d65967aafddf201b3cc7cf5adb195ed2be895e Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:45:13 +0200 Subject: [PATCH 9/9] Bump version.json --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index b9fa941e03..288af47e08 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "13.4.0", + "version": "13.5.0-rc", "assemblyVersion": { "precision": "build" },