From 50729e637df574eb63c876dc152427774ad4b193 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 28 Mar 2024 14:00:21 -0700 Subject: [PATCH] Document the removal of PopulateSettings in 1.9 release notes Fix #15397 --- src/docs/releases/1.9.0.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/docs/releases/1.9.0.md b/src/docs/releases/1.9.0.md index 436c638e1e3..9a96c2c91e8 100644 --- a/src/docs/releases/1.9.0.md +++ b/src/docs/releases/1.9.0.md @@ -44,6 +44,29 @@ services.AddJsonDerivedTypeInfo(); In particular, any type introduced in custom modules inheriting from `MenuItem`, `AdminNode`, `Condition`, `ConditionOperator`, `Query`, `SitemapType` will have to use this method. + - The extension `PopulateSettings(model)` was removed from `PartFieldDefinition`. If you are using this method in your code, you'll have to get the settings using the `Settings` object directly. For instance, if you have this code, + + ```csharp + public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefinition) + { + return Initialize("NumericFieldSettings_Edit", model => partFieldDefinition.PopulateSettings(model)); + } + ``` + + You'll change it to the following: + + ```csharp + public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefinition) + { + return Initialize("NumericFieldSettings_Edit", model => + { + var settings = partFieldDefinition.Settings.ToObject(); + model.Hint = settings.Hint; + // ... + }); + } + ``` + ### Media Indexing Previously, `.pdf` files were automatically indexed in the search providers (Elasticsearch, Lucene or Azure AI Search). Now, if you want to continue to index `.PDF` file you'll need to enable the `OrchardCore.Media.Indexing.Pdf` feature.