FindAllPagesWithCriteria error after upgrading to EPiServer 8.1.0

Vote:
 

This week we've been busy with updating our project from EPiServer 7.11.0 to 8.1.0. The upgrade went quite easy, we just had to change some things in the UrlResolve implementation. However, today we ran into an issue which seems like a bug to me. We have a piece of code which retrieves a page by a property on the page, this is done using the following code

var parkPage =
                DataFactory.Instance.FindAllPagesWithCriteria(new PageReference(HomepageReference), parkIdSelection, locale, new LanguageSelector(locale)).FirstOrDefault();

This worked fine for all locales in version 7.11.0, but in version 8.1.0 this only seems to be working for the locale that the page was actually created in, if I try it for another locale I get no results. Since these pages are always created in Dutch by a script we can work around the issue by using

var parkPage =
                DataFactory.Instance.FindAllPagesWithCriteria(new PageReference(HomepageReference), parkIdSelection, BaseLocale, new LanguageSelector(BaseLocale)).FirstOrDefault();
            if (parkPage != null && parkPage.LanguageBranch != locale)
            {
                var contentRepository = ServiceLocator.Current.GetInstance();
                parkPage = contentRepository.Get(parkPage.ContentLink, new LanguageSelector(locale).Language);
            }

Is there something we're missing here?

Thanks,

Thomas

#118778
Mar 13, 2015 13:59
Vote:
 

So which languages are the page available in and what language are you searching for? Also, is the property culture specific or not?

#118788
Mar 13, 2015 15:09
Vote:
 

The pages are available in all languages that the website is also available in (NL, DE and EN). The property is not culture specific.

#118789
Mar 13, 2015 15:11
* 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.