Skip to content

Conversation

@AndyButland
Copy link
Contributor

@AndyButland AndyButland commented Nov 7, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

Addresses #20760

Description

The linked issue notes that in 13 you could call ChildrenForAllCultures or Children("*") to get all children published in any culture. The former method has been removed but the latter doesn't work the same as in 13 (it now returns no children as it looks for documents published in the specific culture of "*", which of course doesn't exist).

This PR restores the 13 behaviour by allowing a request to Children("*") to get all children published in any culture.

Testing

Review unit test and verify manually with the following setup:

  • Create a document with a mixed set of children:
    • Invariant published
    • Invariant unpublished
    • Variant and published in the default culture
    • Variant and published in a non-default culture
    • Variant and published in the both cultures
    • Variant and published in the no cultures

Request children with code like the following and verify results are as expected (all documents published in any culture are shown).

@{
    var children = Model.Children("*").ToList();
    <div>Found: @children.Count</div>
    <ul>
        @foreach (var child in children)
        {
            <li>@child.Name (Id: @child.Id)</li>
        }
    </ul>
}

Copilot AI review requested due to automatic review settings November 7, 2025 11:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for using "*" (Constants.System.InvariantCulture) as a culture parameter to retrieve published content across all cultures, rather than being limited to a specific culture. This aligns with behavior from previous Umbraco versions.

Key changes:

  • Updated PublishedContentStatusFilteringService to bypass culture filtering when "*" is provided
  • Modified PublishStatusService to treat "*" as "published in any culture"
  • Added comprehensive test coverage for the "*" culture parameter across different content variance scenarios

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/Umbraco.Core/Services/PublishStatus/PublishedContentStatusFilteringService.cs Renamed method and added logic to bypass culture filtering when "*" is requested
src/Umbraco.Core/Services/PublishStatus/PublishStatusService.cs Added check to treat "*" as "published in any culture"
tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/PublishStatus/PublishedContentStatusFilteringServiceTests.cs Added test cases for "*" culture parameter and corresponding assertions for variant and mixed variance scenarios

@Zeegaan
Copy link
Member

Zeegaan commented Nov 10, 2025

Works like a charm 🚀
image

@Zeegaan Zeegaan merged commit fcfaff9 into main Nov 10, 2025
25 of 26 checks passed
@Zeegaan Zeegaan deleted the v17/bugfix/restore-ability-to-get-children-of-any-culture branch November 10, 2025 02:02
@GianniDPC
Copy link

Just a question, why doesn't this make the RTM? I mean isn't this breaking functionality for a lot of people?

@AndyButland
Copy link
Contributor Author

Once we are in the release candidate period @GianniDPC, we try to limit updates to clear regressions from the previous minor release, or fixes to new features introduced with the release. This is to lessen the risk of introducing issues after a considerable amount of internal and external testing is completed. This issue goes back likely all the way to Umbraco 14, so didn't fall into that category, and as such we targeted it for 17.1. There will be an RC of that version out 4 weeks after the release of 17.0

@GianniDPC
Copy link

Once we are in the release candidate period @GianniDPC, we try to limit updates to clear regressions from the previous minor release, or fixes to new features introduced with the release. This is to lessen the risk of introducing issues after a considerable amount of internal and external testing is completed. This issue goes back likely all the way to Umbraco 14, so didn't fall into that category, and as such we targeted it for 17.1. There will be an RC of that version out 4 weeks after the release of 17.0

Ok. Thanks again for solving this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants