Skip to content

Commit edf95e6

Browse files
committed
adds deprecation notices to AllowNonExistingSegmentsCreation
1 parent adf8708 commit edf95e6

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentConfigurationResponseModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ public class DocumentConfigurationResponseModel
88

99
public required bool AllowEditInvariantFromNonDefault { get; set; }
1010

11+
[Obsolete("This functionality will be moved to a client-side extension. Scheduled for removal in V19.")]
1112
public required bool AllowNonExistingSegmentsCreation { get; set; }
1213
}

src/Umbraco.Core/Configuration/Models/SegmentSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ public class SegmentSettings
1919
/// <summary>
2020
/// Gets or sets a value indicating whether the creation of non-existing segments is allowed.
2121
/// </summary>
22+
[Obsolete("This functionality will be moved to a client-side extension. Scheduled for removal in V19.")]
2223
public bool AllowCreation { get; set; } = StaticAllowCreation;
2324
}

src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ export class UmbDocumentWorkspaceContext
9696
const allowSegmentCreation = config?.allowNonExistingSegmentsCreation ?? false;
9797
const allowEditInvariantFromNonDefault = config?.allowEditInvariantFromNonDefault ?? true;
9898

99+
// Deprecation warning for allowNonExistingSegmentsCreation (default from server is true, so we warn on false)
100+
if (!allowSegmentCreation) {
101+
new UmbDeprecation({
102+
deprecated: 'The "AllowNonExistingSegmentsCreation" setting is deprecated.',
103+
removeInVersion: '19.0.0',
104+
solution: 'This functionality will be moved to a client-side extension.',
105+
}).warn();
106+
}
107+
99108
this._variantOptionsFilter = (variantOption) => {
100109
const isNotCreatedSegmentVariant = variantOption.segment && !variantOption.variant;
101110

0 commit comments

Comments
 (0)