From 254c170949e5f46cf2d80a2a06a2e0651185f365 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Wed, 23 Apr 2025 10:03:13 +0200 Subject: [PATCH 1/6] Added additional logging settings --- .../configuration/loggingsettings.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/16/umbraco-cms/reference/configuration/loggingsettings.md b/16/umbraco-cms/reference/configuration/loggingsettings.md index 5a4eb24d4cf..eb18b6e5194 100644 --- a/16/umbraco-cms/reference/configuration/loggingsettings.md +++ b/16/umbraco-cms/reference/configuration/loggingsettings.md @@ -13,7 +13,9 @@ The following configuration is available in the Logging settings: "CMS": { "Logging": { "MaxLogAge": "2.00:00:00", - "Directory": "~/CustomLogFileLocation" + "Directory": "~/CustomLogFileLocation", + "FileNameFormat": "UmbracoTraceLog.{0}..json", + "FileNameFormatArguments": "MachineName" } } } @@ -30,3 +32,22 @@ To increase the maximum age of the entries in the audit log to 48 hours (2 days) By default, all log files are saved to the `umbraco/Logs` directory. You can define a custom directory for your log files by using the `Directory` key in the Logging settings. Set the value to `~/LogFiles` to add all log files to a `LogFiles` directory in the root of the file structure. + +## FileNameFormat + +The default file name format for the Umbraco log file is `UmbracoTraceLog.{0}..json`. The single argument is replaced at runtime with the server's machine name. + +If you want to change the file name or include additional arguments, you can amend the format with this setting. + +## FileNameFormatArguments + +By default the single argument for the log file format name is the server's machine name. + +Other or additional arguments can be provided via this setting as a comma delimited string: + +- `MachineName` - the server's name. +- `EnvironmentName` - the ASP.NET environment name such as "Development" or "Production. + +So for example, to provide both supported arguments you would configure `MachineName,EnvironmentName`. + +The number of arguments provided should match the placeholders in the configured `FileNameFormat`. From a42bddfb1ff60bd31d6d49f85c33349a17f17b47 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Thu, 24 Apr 2025 16:02:01 +0200 Subject: [PATCH 2/6] Breaking changes and asynchronous package migrations. --- .../extending/packages/creating-a-package.md | 52 ++++++++++++++++++- .../upgrading/version-specific/README.md | 16 ++++++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/16/umbraco-cms/extending/packages/creating-a-package.md b/16/umbraco-cms/extending/packages/creating-a-package.md index c11745c70ac..6f3e5a0d1ee 100644 --- a/16/umbraco-cms/extending/packages/creating-a-package.md +++ b/16/umbraco-cms/extending/packages/creating-a-package.md @@ -124,7 +124,7 @@ You can specify package metadata directly in the `csproj` file. Here, is an exam ```xml - . . . + . . . CustomWelcomeDashboard Custom welcome dashboard for Umbraco. umbraco plugin package @@ -282,7 +282,7 @@ public class CustomPackageMigration : PackageMigrationBase IShortStringHelper shortStringHelper, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, IMigrationContext context, - IOptions packageMigrationsSettings) + IOptions packageMigrationsSettings) : base( packagingService, mediaService, @@ -302,6 +302,54 @@ public class CustomPackageMigration : PackageMigrationBase } ``` +If your migration step has a requirement for asynchronous work, you can also inherit from `AsyncPackageMigrationBase`: + +```csharp +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Migrations; +using Umbraco.Cms.Infrastructure.Packaging; + +namespace Umbraco.Cms.Web.UI.Custom.PackageMigration; + +public class CustomPackageAsyncMigration : AsyncPackageMigrationBase +{ + + public TestMigrationStep2( + IPackagingService packagingService, + IMediaService mediaService, + MediaFileManager mediaFileManager, + MediaUrlGeneratorCollection mediaUrlGenerators, + IShortStringHelper shortStringHelper, + IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, + IMigrationContext context, + IOptions packageMigrationsSettings, + IUserGroupService userGroupService, + IUserService userService) + : base( + packagingService, + mediaService, + mediaFileManager, + mediaUrlGenerators, + shortStringHelper, + contentTypeBaseServiceProvider, + context, + packageMigrationsSettings) + { + } + + protected override async Task MigrateAsync() + { + // Use await for asynchronous work. + } +} +``` + Here we also added the ZIP file as an embedded resource to the package project. ![ZIP as an embedded resource](<../../../../10/umbraco-cms/extending/packages/images/embeded-resource-props (1).png>) diff --git a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md index e0d59217ade..6c61474545d 100644 --- a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md +++ b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md @@ -19,6 +19,22 @@ Use the [general upgrade guide](../) to complete the upgrade of your project.
+Umbraco 16 + +**TinyMCE is removed** + +In Umbraco 15 there were two property editors available for a rich text editor - TinyMCE and TipTap. + +With Umbraco 16 only TipTap is available as an option out-of-the-box. TinyMCE's [change of license](https://github.com/tinymce/tinymce/issues/9453#issuecomment-2327646149) precludes us from shipping it with the MIT licensed Umbraco CMS. + +When upgrading to Umbraco 16 any data types using TinyMCE will be migrated to use TipTap. + +To continue to use TinyMCE a third-party package will need to be installed prior to the upgrade. That will disable the migration and allow you to continue with TinyMCE. + +
+ +
+ Umbraco 15 **Snapshots are removed** From b4c66718330a97b3073bd9ddc11bf3fce2307002 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Thu, 24 Apr 2025 16:04:38 +0200 Subject: [PATCH 3/6] Added acronym definition --- .../fundamentals/setup/upgrading/version-specific/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md index 6c61474545d..ae579ed557b 100644 --- a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md +++ b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md @@ -25,7 +25,7 @@ Use the [general upgrade guide](../) to complete the upgrade of your project. In Umbraco 15 there were two property editors available for a rich text editor - TinyMCE and TipTap. -With Umbraco 16 only TipTap is available as an option out-of-the-box. TinyMCE's [change of license](https://github.com/tinymce/tinymce/issues/9453#issuecomment-2327646149) precludes us from shipping it with the MIT licensed Umbraco CMS. +With Umbraco 16 only TipTap is available as an option out-of-the-box. TinyMCE's [change of license](https://github.com/tinymce/tinymce/issues/9453#issuecomment-2327646149) precludes us from shipping it with the MIT (Massachusetts Institute of Technology) licensed Umbraco CMS. When upgrading to Umbraco 16 any data types using TinyMCE will be migrated to use TipTap. From 4e1663f0803149501595d8a59450fe022966a3dc Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Thu, 24 Apr 2025 16:18:36 +0200 Subject: [PATCH 4/6] Removed MIT definition --- .../fundamentals/setup/upgrading/version-specific/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md index ae579ed557b..e3c6949ba4f 100644 --- a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md +++ b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md @@ -25,7 +25,7 @@ Use the [general upgrade guide](../) to complete the upgrade of your project. In Umbraco 15 there were two property editors available for a rich text editor - TinyMCE and TipTap. -With Umbraco 16 only TipTap is available as an option out-of-the-box. TinyMCE's [change of license](https://github.com/tinymce/tinymce/issues/9453#issuecomment-2327646149) precludes us from shipping it with the MIT (Massachusetts Institute of Technology) licensed Umbraco CMS. +With Umbraco 16 only TipTap is available as an option out-of-the-box. TinyMCE's [change of license](https://github.com/tinymce/tinymce/issues/9453#issuecomment-2327646149) precludes us from shipping it with the MIT licensed Umbraco CMS. When upgrading to Umbraco 16 any data types using TinyMCE will be migrated to use TipTap. From 5527a4f6448c26f3bf79edf31cc587552366e619 Mon Sep 17 00:00:00 2001 From: sofietoft Date: Tue, 29 Apr 2025 11:12:24 +0200 Subject: [PATCH 5/6] Minor grammar stuff --- .../setup/upgrading/version-specific/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md index e3c6949ba4f..a973e25fbdb 100644 --- a/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md +++ b/16/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md @@ -23,13 +23,13 @@ Use the [general upgrade guide](../) to complete the upgrade of your project. **TinyMCE is removed** -In Umbraco 15 there were two property editors available for a rich text editor - TinyMCE and TipTap. +In Umbraco 15, two property editors were available for a rich text editor: TinyMCE and TipTap. -With Umbraco 16 only TipTap is available as an option out-of-the-box. TinyMCE's [change of license](https://github.com/tinymce/tinymce/issues/9453#issuecomment-2327646149) precludes us from shipping it with the MIT licensed Umbraco CMS. +With Umbraco 16, only TipTap is available as an option out of the box. TinyMCE's [change of license](https://github.com/tinymce/tinymce/issues/9453#issuecomment-2327646149) precludes us from shipping it with the MIT-licensed Umbraco CMS. -When upgrading to Umbraco 16 any data types using TinyMCE will be migrated to use TipTap. +When upgrading to Umbraco 16, any data types using TinyMCE will be migrated to use TipTap. -To continue to use TinyMCE a third-party package will need to be installed prior to the upgrade. That will disable the migration and allow you to continue with TinyMCE. +To continue to use TinyMCE, a third-party package must be installed prior to the upgrade. This will disable the migration and allow you to continue with TinyMCE.
From 97b49c24a12d94b97cdd06cf0c247d0fbdc33c45 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Tue, 29 Apr 2025 13:01:56 +0200 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: sofietoft --- 16/umbraco-cms/reference/configuration/loggingsettings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/16/umbraco-cms/reference/configuration/loggingsettings.md b/16/umbraco-cms/reference/configuration/loggingsettings.md index eb18b6e5194..f3357d30fb9 100644 --- a/16/umbraco-cms/reference/configuration/loggingsettings.md +++ b/16/umbraco-cms/reference/configuration/loggingsettings.md @@ -37,13 +37,13 @@ Set the value to `~/LogFiles` to add all log files to a `LogFiles` directory in The default file name format for the Umbraco log file is `UmbracoTraceLog.{0}..json`. The single argument is replaced at runtime with the server's machine name. -If you want to change the file name or include additional arguments, you can amend the format with this setting. +If you want to change the file name or include additional arguments, you can amend the format with the `FileNameFormat` setting. ## FileNameFormatArguments By default the single argument for the log file format name is the server's machine name. -Other or additional arguments can be provided via this setting as a comma delimited string: +Other or additional arguments can be provided via the `FileNameFormatArguments` setting using a comma-delimited string: - `MachineName` - the server's name. - `EnvironmentName` - the ASP.NET environment name such as "Development" or "Production.