Dynamic root broken since 13.6
# help-with-umbraco
b
Hi all, I've upgraded to 13.6 recently and am now noticing that the dynamic root is no longer working. I have a custom root that I can use to set specific folders as the root. Since upgrading this no longer works, I always get a popup "No matching content" Has anyone else had this problem?
Copy code
public class DynamicRootByContentType
    : IDynamicRootQueryStep
{
    private readonly IContentService _contentService;
    private readonly string _alias;
    private readonly string _contentTypeAlias;

    public DynamicRootByContentType(IContentService contentService, string alias, string contentTypeAlias)
    {
        _contentService = contentService;
        _alias = alias;
        _contentTypeAlias = contentTypeAlias;
    }

    public Task<Attempt<ICollection<Guid>>> ExecuteAsync(ICollection<Guid> origins, DynamicRootQueryStep filter)
    {
        if (!string.Equals(filter.Alias, _alias, StringComparison.OrdinalIgnoreCase))
        {
            return Task.FromResult(Attempt<ICollection<Guid>>.Fail());
        }

        var contentAtRoot = _contentService.GetRootContent().Where(r => string.Equals(r.ContentType.Alias, _contentTypeAlias, StringComparison.Ordinal));
        return Task.FromResult(Attempt<ICollection<Guid>>.Succeed(contentAtRoot.Select(car => car.Key).ToList()));
    }
}
6 Views