diff --git a/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs index 5d076812f394..c5f7e1a37acb 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentVariantMapper.cs @@ -113,11 +113,25 @@ private IEnumerable GetLanguages(MapperContext context) /// /// /// - /// Returns all segments assigned to the content including 'null' values + /// Returns all segments assigned to the content including the default `null` segment. /// private IEnumerable GetSegments(IContent content) { - return content.Properties.SelectMany(p => p.Values.Select(v => v.Segment)).Distinct(); + // The current segments of a content item are determined + // entirely on the current property values of the content. + var segments = content.Properties + .SelectMany(p => p.Values.Select(v => v.Segment)) + .Distinct() + .ToList(); + + if(segments.Count == 0) + { + // The default segment is always there, + // even when there is no property data at all yet + segments.Add(null); + } + + return segments; } private ContentVariantDisplay CreateVariantDisplay(MapperContext context, IContent content, Language language, string segment)