Further fix to configuration classes using ISet, resolving regression with custom 404 pages (#19573)
Further fix to configuration classes using ISet, resolving regression with custom 404 pages.
This commit is contained in:
11
src/Umbraco.Core/CompatibilitySuppressions.xml
Normal file
11
src/Umbraco.Core/CompatibilitySuppressions.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Suppression>
|
||||
<DiagnosticId>CP0002</DiagnosticId>
|
||||
<Target>M:Umbraco.Cms.Core.Configuration.Models.ContentSettings.get_Error404Collection</Target>
|
||||
<Left>lib/net9.0/Umbraco.Core.dll</Left>
|
||||
<Right>lib/net9.0/Umbraco.Core.dll</Right>
|
||||
<IsBaselineSuppression>true</IsBaselineSuppression>
|
||||
</Suppression>
|
||||
</Suppressions>
|
||||
@@ -50,7 +50,7 @@ public class ContentSettings
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the collection of error pages.
|
||||
/// </summary>
|
||||
public ISet<ContentErrorPage> Error404Collection { get; set; } = new HashSet<ContentErrorPage>();
|
||||
public IEnumerable<ContentErrorPage> Error404Collection { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the preview badge mark-up.
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.Configuration.Models.Validati
|
||||
new ContentSettings
|
||||
{
|
||||
Error404Collection =
|
||||
{
|
||||
[
|
||||
new() { Culture = culture, ContentId = 1 },
|
||||
},
|
||||
],
|
||||
Imaging =
|
||||
{
|
||||
AutoFillImageProperties =
|
||||
|
||||
Reference in New Issue
Block a user