Skip to content

Commit 2d58c89

Browse files
authored
Merge branch 'umbraco:main' into main
2 parents 03d3b7c + 1b761be commit 2d58c89

File tree

95 files changed

+2154
-731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2154
-731
lines changed

10/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/nested-content.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
We highly recommend that you use the [Block List](block-editor/block-list-editor.md) instead.
55

66
Nested Content has been marked as obsolete and development on the property editor has been discontinued.
7+
8+
[Umbraco Deploy](https://docs.umbraco.com/umbraco-deploy/deployment-workflow/import-export/import-with-migrations) and [uSync migrations](https://github.com/Jumoo/uSyncMigrations) have support for migrating from nested content to the block list.
79
{% endhint %}
810

911
`Alias: Umbraco.NestedContent`
@@ -106,7 +108,7 @@ Example:
106108
// Render your content, e.g. item.Value<string>("heading")
107109
}
108110
}
109-
111+
110112
}
111113
```
112114

@@ -176,31 +178,31 @@ Afterwards, the entire list needs to be serialized to Json via JsonConvert.
176178
@using Newtonsoft.Json;
177179
@inject IContentService _contentService;
178180

179-
//if the class containing our code inherits SurfaceController, UmbracoApiController,
181+
//if the class containing our code inherits SurfaceController, UmbracoApiController,
180182
//or UmbracoAuthorizedApiController, we can get ContentService from Services namespace
181-
var contentService = _contentService;
183+
var contentService = _contentService;
182184
//here we create a new node, and fill out attendeeList afterwards
183-
IContent request = contentService.Create("new node", guid, "mydoctype", -1);
185+
IContent request = contentService.Create("new node", guid, "mydoctype", -1);
184186
//our list which will contain nested content
185-
var attendees = new List<Dictionary<string, string>>();
187+
var attendees = new List<Dictionary<string, string>>();
186188
//participants is our list of attendees - multiple items, good use case for nested content
187-
foreach (var person in participants)
189+
foreach (var person in participants)
188190
attendees.Add(new Dictionary<string, string>() {
189191
//this is the only "default" value we need to fill for nested item
190-
{"ncContentTypeAlias","attendee"},
192+
{"ncContentTypeAlias","attendee"},
191193
{"user_name", person.name},
192194
{"user_email",person.user_email},
193-
{"join_time",person.join_time.ToString()},
195+
{"join_time",person.join_time.ToString()},
194196
//we convert some properties to String just to be on the safe side
195197
{"leave_time",person.leave_time.ToString()},
196198
{"duration",person.duration.ToString()},
197199
{"phone",person.phone.ToString()}
198200
});
199201
}
200202
//bind the attendees List to attendeeList property on the newly created content node
201-
request.SetValue("attendeeList", JsonConvert.SerializeObject(attendees));
203+
request.SetValue("attendeeList", JsonConvert.SerializeObject(attendees));
202204
//Save the entire node via ContentService
203-
ContentService.SaveAndPublish(request);
205+
ContentService.SaveAndPublish(request);
204206
```
205207

206208
In the above sample we iterate through a list of participants (the data for such participants could be coming from an API, for example), and add a new `Dictionary` item for each person in the list.

10/umbraco-cms/reference/configuration/contentsettings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The following snippet will give an overview of the keys and values in the conten
1313
"KeepAllVersionsNewerThanDays": 7,
1414
"KeepLatestVersionPerDayForDays": 90
1515
},
16-
"AllowEditInvariantFromNonDefault": true,
16+
"AllowEditInvariantFromNonDefault": false,
1717
"AllowedUploadFiles": [],
1818
"AllowedMediaHosts": [],
1919
"DisableDeleteWhenReferenced": false,
@@ -60,9 +60,9 @@ In the root level section, that is those without a seperate sub section like Ima
6060

6161
Invariant properties are properties on a multilingual site that are not varied by culture. This means that they share the same value across all languages added to the website.
6262

63-
When the setting is set to `false` the invariant properties that are shared between all languages can only be edited from the default language. This means you need access to the default language, in order to edit the property.
63+
When the setting is set to `false` (default) the invariant properties that are shared between all languages can only be edited from the default language. This means you need access to the default language, in order to edit the property.
6464

65-
When set to `true` (default) the invariant properties will need to be unlocked before they can be edited. The lock exists in order to make it clear that this change will affect more languages.
65+
When set to `true` the invariant properties will need to be unlocked before they can be edited. The lock exists in order to make it clear that this change will affect more languages.
6666

6767
### Allowed upload files
6868

10/umbraco-workflow/installation/licensing.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ Once you have received your license code it needs to be installed on your site.
4040
}
4141
```
4242

43+
{% hint style="info" %}
44+
You might run into issues when using a period in the product name when using environment variables. Use an underscore in the product name instead, to avoid problems.
45+
46+
```json
47+
"Umbraco_Workflow": "YOUR_LICENSE_KEY"
48+
```
49+
{% endhint %}
50+
4351
### Verify the license installation
4452

4553
You can verify that your license is successfully installed by logging into your project's backoffice and navigating to the settings section. Here you will see a licenses dashboard which should display the status of your license.

13/umbraco-cms/.gitbook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ redirects:
1212
extending/property-editors/build-a-block-editor: fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/README.md
1313
tutorials/creating-and-distributing-a-package: extending/packages/creating-a-package.md
1414
fundamentals/design/templates/razor-cheatsheet: fundamentals/design/templates/README.md
15+
reference/management-api: reference/dive-into-the-code.md

13/umbraco-cms/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@
368368
* [Cache & Distributed Cache](reference/cache/README.md)
369369
* [Accessing the cache](reference/cache/application-cache.md)
370370
* [ICacheRefresher](reference/cache/icacherefresher.md)
371+
* [IMemberPartialViewCacheInvalidator](reference/cache/imemberpartialviewcacheinvalidator.md)
371372
* [IServerMessenger](reference/cache/iservermessenger.md)
372373
* [Getting/Adding/Updating/Inserting Into Cache](reference/cache/updating-cache.md)
373374
* [Examples](reference/cache/examples/README.md)

13/umbraco-cms/extending/packages/example-package-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ When the next major version of Umbraco is released, we'll test and either extend
3030

3131
### Tests Project
3232

33-
We have a [project for unit tests](https://github.com/umbraco/Umbraco.AuthorizedServices/tree/main/tests/Umbraco.AuthorizedServices.Tests) in `tests/<ProjectName>.Tests`. It contains references to `Umbraco.Cms.Tets` and a project reference to the package:
33+
We have a [project for unit tests](https://github.com/umbraco/Umbraco.AuthorizedServices/tree/main/tests/Umbraco.AuthorizedServices.Tests) in `tests/<ProjectName>.Tests`. It contains references to `Umbraco.Cms.Tests` and a project reference to the package:
3434

3535
```xml
3636
<ProjectReference Include="..\..\src\Umbraco.AuthorizedServices\Umbraco.AuthorizedServices.csproj" />

13/umbraco-cms/fundamentals/backoffice/variants.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ Each Property Editor that does not allow variants (an Invariant Property) will b
6666
{% hint style="info" %}
6767
Whether or not the lock is enabled on the invariant properties depends on the `AllowEditInvariantFromNonDefault` setting in the `appsettings.json` file.
6868

69-
For projects created on Umbraco version 10.2 or later, the setting is `true`, by default. If the project is upgraded to version 10.2 or later, the setting will by default be `false`.
70-
7169
Learn more about the `AllowEditInvariantFromNonDefault` setting in the [Security Settings](../../reference/configuration/securitysettings.md) article.
7270
{% endhint %}
7371

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Partial view cache refresher for members
2+
3+
This section describes the `IMemberPartialViewCacheInvalidator` interface, what it's default implementation does and how to customize it.
4+
5+
## What is an IMemberPartialViewCacheInvalidator?
6+
7+
This interface is used to isolate the logic that invalidates parts of the partial view cache when a member is updated.
8+
9+
## Why do we need to partially invalidate the partial view cache?
10+
11+
Razor templates may show data that is retrieved from a member object. Those templates might be cached by using the partial caching mechanism (for example, `@await Html.CachedPartialAsync("member",Model,TimeSpan.FromDays(1), cacheByMember:true)`). When a member is updated, these cached partials must be invalidated to ensure updated data is shown.
12+
13+
## Where is it used?
14+
15+
This interface is called from the member cache refresher (`MemberCacheRefresher`), which is invoked every time a member is updated.
16+
17+
## Details of the default implementation
18+
19+
Razor template partials are cached through a call to `Html.CachedPartialAsync` with `cacheByMember` set to `true`. This will append the ID of the currently logged-in member with a marker to the partial view cache key. For example, `-m1015-`.
20+
21+
When the `ClearPartialViewCacheItems` method is called it will clear all cache items that match the marker for the updated members.
22+
23+
If no member is logged in during caching, items with an empty member marker (for example, `-m-`) are also cleared.
24+
25+
## Customizing the implementation
26+
27+
You can replace the default implementation by removing it and registering your own in a composer.
28+
29+
```csharp
30+
public class ReplaceMemberCacheInvalidatorComposer : IComposer
31+
{
32+
public void Compose(IUmbracoBuilder builder)
33+
{
34+
builder.Services.AddUnique<IMemberPartialViewCacheInvalidator, MyCustomMemberPartialViewCacheInvalidator>();
35+
}
36+
}
37+
```

13/umbraco-cms/reference/configuration/contentsettings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following snippet will give an overview of the keys and values in the conten
1717
"KeepAllVersionsNewerThanDays": 7,
1818
"KeepLatestVersionPerDayForDays": 90
1919
},
20-
"AllowEditInvariantFromNonDefault": true,
20+
"AllowEditInvariantFromNonDefault": false,
2121
"AllowedMediaHosts": [],
2222
"AllowedUploadedFileExtensions": [],
2323
"DisableDeleteWhenReferenced": false,
@@ -62,9 +62,9 @@ In the root level section, that is those without a separate sub section like Ima
6262

6363
Invariant properties are properties on a multilingual site that are not varied by culture. This means that they share the same value across all languages added to the website.
6464

65-
When the setting is set to `false` the invariant properties that are shared between all languages can only be edited from the default language. This means you need access to the default language, in order to edit the property.
65+
When the setting is set to `false` (default) the invariant properties that are shared between all languages can only be edited from the default language. This means you need access to the default language, in order to edit the property.
6666

67-
When set to `true` (default) the invariant properties will need to be unlocked before they can be edited. The lock exists in order to make it clear that this change will affect more languages.
67+
When set to `true` the invariant properties will need to be unlocked before they can be edited. The lock exists in order to make it clear that this change will affect more languages.
6868

6969
### Allowed upload file extensions
7070

13/umbraco-cms/reference/security/external-login-providers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ In those cases, it would mean that anyone who has a Google or Facebook account c
151151

152152
If auto-linking for public providers such as these was needed you would need to limit the access. This can be done by domain or other information provided in the claims using the options/callbacks specified in those provider's authentication options.
153153

154+
When auto-linking for the backoffice you will want to define what user groups the user will be part of. This is done via the `defaultUserGroups` parameter provided to the constructor of `ExternalSignInAutoLinkOptions` (see example below). If the value is not set the user will by default be added to the Editors group.
155+
154156
### Auto-linking on Member authentication
155157

156158
Auto-linking on Member authentication only makes sense if you have a public member registration already or the provider does not have public account creation.

0 commit comments

Comments
 (0)