PageLanguages property in PageData is deprecated. It suggests to use ExistingLanguages property instead of the PageLanguages. However, when comes to the filtering, previously the language filtering has been handled by
.Filter(x => !((PageData)(object)x).PageLanguages.MatchCaseInsensitive(lang))
But when used the below,
.Filter(x => !((PageData)(object)x).ExistingLanguages.ToString().MatchCaseInsensitive(lang))
it gives a different result.
How to get the same result as before by using the ExistingLanguages property (or from other property)? Thanks in advance.
Note: I am working on EPiServer.Find.Cms --> 18.104.22.168 , CMS ---> 22.214.171.124
I would setup an extension method or a readonly property that returns something that works well with Find filtering and the input data in question.
I agree with Johan, you should/can add an extensions method that converts the list of cultureinfo to a list of strings (I do not think ToString do that) and add that to the indexeing and then filter on that.
This has been resolved Using ExistingLanguages() from EPiServer.Find.Cms instead of the ExistingLanguages property from the EPiServer.Core.PageData.
It returns IEnumerable<string> instead of IEnumerable<CultureInfo>.
The final codebase looks like this,
.Filter(x => !((PageData)(object)x).ExistingLanguages().MatchCaseInsensitive(lang))