Try our conversational search powered by Generative AI!

Problem upgrading from version 10.10.4 to 11.1.0



We are trying to upgrade from 10 to 11, and we can't find a way forward for method or property QueryDistinctAccess(AccessLevel.Read), see class and method below.

When going to 11, QueryDistinctAccess is not availble anymore, and we cant find any breaking changes documentation.

Do you have any idea about this issue?

Thanks in advance, 

Mats & Fredrik

using System.Collections.Generic;
using System.Linq;
using EPiServer;
using EPiServer.Core;
using EPiServer.Filters;
using EPiServer.Security;
using EPiServer.ServiceLocation;

namespace KPA.EpiExtensions
    public class SiteContentLoader: ISiteContentLoader
        private readonly IContentLoader _contentLoader;
        private readonly IPageCriteriaQueryService _pageCriteriaQueryService;

        public SiteContentLoader()
            _pageCriteriaQueryService = ServiceLocator.Current.GetInstance<IPageCriteriaQueryService>();
            _contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();

        public SiteContentLoader(IContentLoader contentLoader, IPageCriteriaQueryService pageCriteriaQueryService)
            _contentLoader = contentLoader;
            _pageCriteriaQueryService = pageCriteriaQueryService;

        public IEnumerable<T> GetMenuChildren<T>(ContentReference contentReference) where T : IContent
            return _contentLoader.GetChildren<T>(contentReference).Where(cr => cr.IsPublished() && cr.VisibleInMenu()).Where(c => c.QueryDistinctAccess(AccessLevel.Read));


    public interface ISiteContentLoader
        /// <summary>
        /// GetChildren with filter VisibleInMenu AND IsPublished
        /// </summary>
        /// <typeparam name="T">IContent</typeparam>
        /// <param name="contentReference">Content Reference</param>
        /// <returns>List of Children</returns>
        IEnumerable<T> GetMenuChildren<T>(ContentReference contentReference) where T : IContent;

Mar 02, 2020 11:46

QueryDistinctAccess is still there but it is now in package EPiServer.Cms.AspNet. Do you have reference to that?

Mar 02, 2020 12:06
FredrikB - Mar 02, 2020 12:34
Thanks a lot!!! I now referenced EPiServer.Cms.AspNet, and all is compiling again!! Couldn't find this at the documentation...
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.