Question

I have an odd issue that started appearing after upgrading EPiServer CMS 6 to EPiServer CMS 6 R2.

DataFactory.Instance.GetChildren(page.ParentLink);

The above code returns no children when I run it on the actual site but when I'm using the Editor mode and browse to the page, I get 36 results (which is correct). The datafactory works every other place on the site and it works perfectly for the Swedish site, however it doesn't work for any other language. I should point out that this worked in all languages before the site upgrade to CMS 6 R2.

I need those children! Any ideas?

Was it helpful?

Solution 2

Managed to solve this by specifying the language branch in the call aswell. Didn't need to do this prior to Epi 6 R2 and I still think it's odd that it's working in Editor mode but not on the actual site.

DataFactory.Instance.GetChildren(page.ParentLink, new LanguageSelector(page.LanguageBranch));

OTHER TIPS

Are the child pages published for those languages?

Does this help? It's for CMS 5 but the principle is the same.

http://labs.episerver.com/en/Blogs/Mari-Jorgensen/Dates/2009/2/Breaking-change-in-GetChildren/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top