We built a mirror-function in EPiserver which uses FindPagesWithCriteria to find all pages which match a "MasterPage"-property on pages in our different sites. This function stoped working once we upgraded to EPiServer CMS6 R2. To test the function I created a new page in Indian-english language on our Indian site and then set its MasterPage-property to an english page which was published on our main-site. The problem was that FindPagesWithCriteria only found two other pages on other sites which was previously published. I did notice that these pages were in the language which was the same as the Page I was trying to mirror, i.e. en-GB, but it didn't find the page which I earlier had created in en-IN language. After this I tried the FindPagesWithCriteria with the same parameters but I added that it should also use the "en-IN"-language. This time it actually found the pages on the Indian site which it was supposed to find. My Question is, did EPiServer change the way FindPagesWithCriteria works in CMS 6 and as default it only search for pages which is of the same language as the page which, in this case, I'm publishing? In CMS 5, findpageswithcriteria actually found all pages in all languages which had their MasterPage-property set to the pageId of the published page.
Have you tried to use the overload of FindPagesWithCriteria that takes in both an languageBranch and a language selector?
In that overload languageBranch parameter controls which languages to search in (null means all) and the language selector is used to control which language version to return in the result set.
Ofcourse the solution was that simple. I added null as language-branch and voilá in found 12 pages in 10 different languages instead of only finding in en-GB. Thank you very much!
Jepp happend to me too, is this documented as a change in R2? It worked earlier in CMS 6.0