Try our conversational search powered by Generative AI!

Getting error like :- "Content with id '26377' is of type 'Castle.Proxies.QBankMediaProxy' which does not inherit required type-EPiServer.Core.PageDat

Vote:
 

Hi ,

I have written below query where i am getting error like :- "Content with id '26377' is of type 'Castle.Proxies.QBankMediaProxy' which does not inherit required type-EPiServer.Core.PageData" 

var  listableItems = SearchClient.Instance.Search()
.OrderByDescending(x => x.StartPublish)
.Skip(offSet * pageSize)
.Take(pageSize)
.FilterForVisitor()
.GetPagesResult(LanguageSelector.AutoDetect());

Could you please help me to why i am getting this error and what is the solution for that.

Thanks in advance.

Thanks

Sourav Kamila

#176906
Mar 29, 2017 15:46
Vote:
 

GetPagesResult will try to deserilzing the result to PageData collection, which your content PublicContentPage does not seem to inherit. Probably GetContentResult will work 

#176909
Mar 29, 2017 16:06
* 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.