GetChildren not returning children



I've run into some unexpected behaviour with my EPi Server CMS 8.0.0.

The thing is that when I try to get children for a specific page. The children are not returned unless they have been loaded previously. I can load the children in edit mode by expanding the parent node or by debugging and getting a child, using the Immediate Window.

I've tried ContentLoader, ContentRepository and EPiServer.DataFactory.Instance.GetChildren. They all have the same problem.

  • I have a page that has a couple of children. When getting the page's children I set a breakpoint.
  • With the execution halted I run calls to GetChildren methods on ContentLoader, ContentRepository and DataFactory. They all return zero children.
  • I load one of the children using (new PageReference()).GetPage()
  • I re-run the methods in step 2 and they all return that ONE child i just loaded. The other children are still missing.

If I expand the children of the page in edit mode once, they are returned in step 2 above. After recycling the AppPool the problem appears again.

Have any of you seen this?
Any ideas on how to solve it?

Site is protected by forms authentication. I have access to the pages (admin). The pages are published. It is a multi-lingual site.


EPiServer.DataFactory.Instance.GetChildren(pageReference, LanguageSelector.AutoDetect(true)) returns children but only in the master language (swedish). 
EPiServer.DataFactory.Instance.GetChildren(pageReference, new LanguageSelector("en")) returns no children. 
EPiServer.DataFactory.Instance.GetChildren(pageReference, new LanguageSelector("sv")) returns children.

This code is executed in the context of an System.Web.Http.ApiController. The requested language is passed as a query parameter. Could it be that the current culture is not set correctly?

Please advice.


Sep 02, 2015 14:26

Is this problem isolated to ApiControllers? Do you experience the same problem if you run the code from a page template?

Sep 04, 2015 15:59

Hi Martin,

This seems to be related to the same problem discussed here

It was reported as a bug and fixed in version 8.4.0

Sep 04, 2015 18:55

Alf: Thanks for your help! Yes, unfortunately it behaves the same way inside a PageController.

Andreas: Thanks for that link! Upgrading to 8.11.0 solved it! 

Sep 09, 2015 13:06
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.