diff --git a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs index f08ab2abe58a..c542bcb0307b 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs @@ -160,6 +160,7 @@ @keyframes umbraco-preview-badge--effect {{ internal const bool StaticDisableUnpublishWhenReferenced = false; internal const bool StaticAllowEditInvariantFromNonDefault = false; internal const bool StaticShowDomainWarnings = true; + internal const bool StaticShowUnroutableContentWarnings = true; /// /// Gets or sets a value for the content notification settings. @@ -285,4 +286,10 @@ @keyframes umbraco-preview-badge--effect {{ /// [DefaultValue(StaticShowDomainWarnings)] public bool ShowDomainWarnings { get; set; } = StaticShowDomainWarnings; + + /// + /// Gets or sets a value indicating whether to show unroutable content warnings. + /// + [DefaultValue(StaticShowUnroutableContentWarnings)] + public bool ShowUnroutableContentWarnings { get; set; } = StaticShowUnroutableContentWarnings; } diff --git a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs index ef935b6b5975..a1c5e55ac819 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/ContentController.cs @@ -1278,6 +1278,11 @@ private void AddPublishRoutableErrorNotifications( SimpleNotificationModel globalNotifications, string[]? successfulCultures) { + if (_contentSettings.ShowUnroutableContentWarnings is false) + { + return; + } + IContent? content = publishStatus.FirstOrDefault()?.Content; if (content is null) {