Skip to content

Commit 72f43a5

Browse files
committed
Merge branch 'release/16.4' into v16/dev
2 parents d7231c5 + aea9034 commit 72f43a5

File tree

18 files changed

+345
-161
lines changed

18 files changed

+345
-161
lines changed

src/Umbraco.Core/Models/Blocks/RichTextBlockValue.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@ public RichTextBlockValue(IEnumerable<RichTextBlockLayoutItem> layouts)
2323
/// <inheritdoc />
2424
[JsonIgnore]
2525
public override string PropertyEditorAlias => Constants.PropertyEditors.Aliases.RichText;
26+
27+
/// <inheritdoc />
28+
#pragma warning disable CS0672 // Member overrides obsolete member
29+
#pragma warning disable CS0618 // Type or member is obsolete
30+
public override bool SupportsBlockLayoutAlias(string alias) => base.SupportsBlockLayoutAlias(alias) || alias.Equals("Umbraco.TinyMCE");
31+
#pragma warning restore CS0618 // Type or member is obsolete
32+
#pragma warning restore CS0672 // Member overrides obsolete member
2633
}

src/Umbraco.Core/Models/PublishedContent/IPublishedContentTypeFactory.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ IPublishedPropertyType CreateCorePropertyType(
5353
/// </summary>
5454
PublishedDataType GetDataType(int id);
5555

56+
/// <summary>
57+
/// Clears the internal data type cache.
58+
/// </summary>
59+
void ClearDataTypeCache()
60+
{ }
61+
5662
/// <summary>
5763
/// Notifies the factory of datatype changes.
5864
/// </summary>

src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ public PublishedDataType GetDataType(int id)
6565
return dataType;
6666
}
6767

68+
/// <inheritdoc />
69+
public void ClearDataTypeCache()
70+
{
71+
if (_publishedDataTypes is null)
72+
{
73+
// Not initialized yet, so skip and avoid lock
74+
return;
75+
}
76+
77+
lock (_publishedDataTypesLocker)
78+
{
79+
// Clear cache (and let it lazy initialize again later)
80+
_publishedDataTypes = null;
81+
}
82+
}
83+
6884
/// <inheritdoc />
6985
public void NotifyDataTypeChanges(params int[] ids)
7086
{

src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Umbraco.Cms.Core.DependencyInjection;
88
using Umbraco.Cms.Core.Migrations;
99
using Umbraco.Cms.Core.Models.Membership;
10+
using Umbraco.Cms.Core.Models.PublishedContent;
1011
using Umbraco.Cms.Core.PublishedCache;
1112
using Umbraco.Cms.Core.Scoping;
1213
using Umbraco.Cms.Core.Security;
@@ -51,9 +52,12 @@ public class MigrationPlanExecutor : IMigrationPlanExecutor
5152
private readonly DistributedCache _distributedCache;
5253
private readonly IScopeAccessor _scopeAccessor;
5354
private readonly ICoreScopeProvider _scopeProvider;
55+
private readonly IPublishedContentTypeFactory _publishedContentTypeFactory;
56+
5457
private bool _rebuildCache;
5558
private bool _invalidateBackofficeUserAccess;
5659

60+
[Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 19.")]
5761
public MigrationPlanExecutor(
5862
ICoreScopeProvider scopeProvider,
5963
IScopeAccessor scopeAccessor,
@@ -65,6 +69,33 @@ public MigrationPlanExecutor(
6569
IKeyValueService keyValueService,
6670
IServiceScopeFactory serviceScopeFactory,
6771
AppCaches appCaches)
72+
: this(
73+
scopeProvider,
74+
scopeAccessor,
75+
loggerFactory,
76+
migrationBuilder,
77+
databaseFactory,
78+
databaseCacheRebuilder,
79+
distributedCache,
80+
keyValueService,
81+
serviceScopeFactory,
82+
appCaches,
83+
StaticServiceProvider.Instance.GetRequiredService<IPublishedContentTypeFactory>())
84+
{
85+
}
86+
87+
public MigrationPlanExecutor(
88+
ICoreScopeProvider scopeProvider,
89+
IScopeAccessor scopeAccessor,
90+
ILoggerFactory loggerFactory,
91+
IMigrationBuilder migrationBuilder,
92+
IUmbracoDatabaseFactory databaseFactory,
93+
IDatabaseCacheRebuilder databaseCacheRebuilder,
94+
DistributedCache distributedCache,
95+
IKeyValueService keyValueService,
96+
IServiceScopeFactory serviceScopeFactory,
97+
AppCaches appCaches,
98+
IPublishedContentTypeFactory publishedContentTypeFactory)
6899
{
69100
_scopeProvider = scopeProvider;
70101
_scopeAccessor = scopeAccessor;
@@ -76,6 +107,7 @@ public MigrationPlanExecutor(
76107
_serviceScopeFactory = serviceScopeFactory;
77108
_appCaches = appCaches;
78109
_distributedCache = distributedCache;
110+
_publishedContentTypeFactory = publishedContentTypeFactory;
79111
_logger = _loggerFactory.CreateLogger<MigrationPlanExecutor>();
80112
}
81113

@@ -301,6 +333,7 @@ private async Task RebuildCache()
301333
_appCaches.IsolatedCaches.ClearAllCaches();
302334
await _databaseCacheRebuilder.RebuildAsync(false);
303335
_distributedCache.RefreshAllPublishedSnapshot();
336+
_publishedContentTypeFactory.ClearDataTypeCache();
304337
}
305338

306339
private async Task RevokeBackofficeTokens()

src/Umbraco.Web.UI.Client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Umbraco.Web.UI.Client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@umbraco-cms/backoffice",
33
"license": "MIT",
4-
"version": "16.4.0-rc2",
4+
"version": "16.4.0-rc3",
55
"type": "module",
66
"exports": {
77
".": null,

src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,29 +2869,52 @@ export default {
28692869
ar: 'العربية',
28702870
bs: 'Bosanski',
28712871
cs: 'Česky',
2872+
'cs-cz': 'Česky (Czechia)',
28722873
cy: 'Cymraeg',
2874+
'cy-gb': 'Cymraeg (UK)',
28732875
da: 'Dansk',
2876+
'da-dk': 'Dansk (Danmark)',
28742877
de: 'Deutsch',
2878+
'de-de': 'Deutsch (Deutschland)',
2879+
'de-ch': 'Deutsch (Schweiz)',
28752880
en: 'English (UK)',
28762881
'en-us': 'English (US)',
28772882
es: 'Español',
2883+
'es-es': 'Español (España)',
28782884
fr: 'Français',
2879-
he: 'Hebrew',
2885+
'fr-fr': 'Français (France)',
2886+
'fr-ch': 'Français (Suisse)',
2887+
he: 'עברית',
2888+
'he-il': 'עברית (ישראל)',
28802889
hr: 'Hrvatski',
2890+
'hr-hr': 'Hrvatski (Hrvatska)',
28812891
it: 'Italiano',
2892+
'it-it': 'Italiano (Italia)',
2893+
'it-ch': 'Italiano (Svizzera)',
28822894
ja: '日本語',
2895+
'ja-jp': '日本語 (日本)',
28832896
ko: '한국어',
2897+
'ko-kr': '한국어 (한국)',
28842898
nb: 'Norsk Bokmål',
2899+
'nb-no': 'Norsk (Bokmål)',
28852900
nl: 'Nederlands',
2901+
'nl-nl': 'Nederlands (Nederland)',
28862902
pl: 'Polski',
2903+
'pl-pl': 'Polski (Polska)',
28872904
pt: 'Português',
28882905
'pt-br': 'Português (Brasil)',
2889-
ro: 'Romana',
2906+
ro: 'Română',
2907+
'ro-ro': 'Română (România)',
28902908
ru: 'Русский',
2909+
'ru-ru': 'Русский (Россия)',
28912910
sv: 'Svenska',
2911+
'sv-se': 'Svenska (Sverige)',
28922912
tr: 'Türkçe',
2913+
'tr-tr': 'Türkçe (Türkiye Cumhuriyeti)',
28932914
uk: 'Українська',
2915+
'uk-ua': 'Українська (Україна)',
28942916
zh: '中文',
2917+
'zh-cn': '中文(简体,中国)',
28952918
'zh-tw': '中文(正體,台灣)',
28962919
vi: 'Tiếng Việt',
28972920
},

src/Umbraco.Web.UI.Client/src/assets/lang/vi.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2836,34 +2836,4 @@ export default {
28362836
resetUrlMessage: 'Bạn có chắc chắn muốn đặt lại URL này không?',
28372837
resetUrlLabel: 'Đặt lại',
28382838
},
2839-
uiCulture: {
2840-
ar: 'العربية',
2841-
bs: 'Bosanski',
2842-
cs: 'Česky',
2843-
cy: 'Cymraeg',
2844-
da: 'Dansk',
2845-
de: 'Deutsch',
2846-
en: 'English (UK)',
2847-
'en-us': 'English (US)',
2848-
es: 'Español',
2849-
fr: 'Français',
2850-
he: 'Hebrew',
2851-
hr: 'Hrvatski',
2852-
it: 'Italiano',
2853-
ja: '日本語',
2854-
ko: '한국어',
2855-
nb: 'Norsk Bokmål',
2856-
nl: 'Nederlands',
2857-
pl: 'Polski',
2858-
pt: 'Português',
2859-
'pt-br': 'Português (Brasil)',
2860-
ro: 'Romana',
2861-
ru: 'Русский',
2862-
sv: 'Svenska',
2863-
tr: 'Türkçe',
2864-
uk: 'Українська',
2865-
zh: '中文',
2866-
'zh-tw': '中文(正體,台灣)',
2867-
vi: 'Tiếng Việt',
2868-
},
28692839
} as UmbLocalizationDictionary;

src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type {
1717
UmbPropertyEditorUiElement,
1818
UmbPropertyEditorConfigCollection,
1919
} from '@umbraco-cms/backoffice/property-editor';
20-
import { observeMultiple } from '@umbraco-cms/backoffice/observable-api';
20+
import { jsonStringComparison, observeMultiple } from '@umbraco-cms/backoffice/observable-api';
2121
import { UMB_PROPERTY_CONTEXT, UMB_PROPERTY_DATASET_CONTEXT } from '@umbraco-cms/backoffice/property';
2222
import { UmbFormControlMixin, UmbValidationContext } from '@umbraco-cms/backoffice/validation';
2323
import type { UmbBlockTypeGroup } from '@umbraco-cms/backoffice/block-type';
@@ -181,15 +181,22 @@ export class UmbPropertyEditorUIBlockGridElement
181181
]).pipe(debounceTime(20)),
182182
([layouts, contents, settings, exposes]) => {
183183
if (layouts.length === 0) {
184+
if (this.value === undefined) {
185+
return;
186+
}
184187
super.value = undefined;
185188
} else {
186-
super.value = {
189+
const newValue = {
187190
...super.value,
188191
layout: { [UMB_BLOCK_GRID_PROPERTY_EDITOR_SCHEMA_ALIAS]: layouts },
189192
contentData: contents,
190193
settingsData: settings,
191194
expose: exposes,
192195
};
196+
if (jsonStringComparison(this.value, newValue)) {
197+
return;
198+
}
199+
super.value = newValue;
193200
}
194201

195202
// If we don't have a value set from the outside or an internal value, we don't want to set the value.

src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
UmbFormControlMixin,
2626
UmbValidationContext,
2727
} from '@umbraco-cms/backoffice/validation';
28-
import { observeMultiple } from '@umbraco-cms/backoffice/observable-api';
28+
import { jsonStringComparison, observeMultiple } from '@umbraco-cms/backoffice/observable-api';
2929
import { debounceTime } from '@umbraco-cms/backoffice/external/rxjs';
3030
import { UMB_CONTENT_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/content';
3131

@@ -339,15 +339,22 @@ export class UmbPropertyEditorUIBlockListElement
339339
]).pipe(debounceTime(20)),
340340
([layouts, contents, settings, exposes]) => {
341341
if (layouts.length === 0) {
342+
if (this.value === undefined) {
343+
return;
344+
}
342345
super.value = undefined;
343346
} else {
344-
super.value = {
347+
const newValue = {
345348
...super.value,
346349
layout: { [UMB_BLOCK_LIST_PROPERTY_EDITOR_SCHEMA_ALIAS]: layouts },
347350
contentData: contents,
348351
settingsData: settings,
349352
expose: exposes,
350353
};
354+
if (jsonStringComparison(this.value, newValue)) {
355+
return;
356+
}
357+
super.value = newValue;
351358
}
352359

353360
// If we don't have a value set from the outside or an internal value, we don't want to set the value.

0 commit comments

Comments
 (0)