Do you have Media descriptor attribute in your Image model class?
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png")]
public class ImageFile : ImageData
Hi K Khan,
Thanks for your quick response. Yes I have MediaDescriptor defined. Have it on ImageFile and VideoFile, GenericMedia does not have any.
Code is like
[ContentType(GUID = "0A89E464-56D4-449F-AEA8-2BF774AB8730")] [MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png")] public class ImageFile : ImageData
Declaration looks correct to me, another possible reason can be in code some where you are trying to load Image and converting it to PageDat e.g.
contenLoader.Get<PageData>(ContentReference) as PageData
where ContentReference is a reference of image
Any maybe the index contains obsolete data.
You could try to reindex it manually using: http://[Site address]/EPiServer/CMS/Admin/IndexContent.aspx
Thanks for your reply, I shall check that.
Thank you all for your help. Figured out what the actual problem was, we had installed Find and Search both on our site. So after I disabled Find as the search provider. Search started working in edit mode. Hence it seems find was causing this conversion problem.
Thanks a lot for your response and time. God Bless You
I meet this error message, too, and in my situation @K Khan is correct:
contenLoader.Get<PageData>(ContentReference) as PageData where ContentReference is a reference of image
Getting this error when searching from edit mode.
Content with id 'xyz' is of type 'Castle.Proxies.ImageFileProxy' which does not inherit required type 'EPiServer.Core.PageData'.