In a scheduled job, I'm retrieving content that I've found via Find. When passing an instance of a EPiServer.Find.Cms.IndexableContentReference (that happens to point at a BundleContent) to IContentLoader, it throws an exception telling me it does not exist. This happens even if I say _contentLoader.Get<IContent>(...).
However, if I simply create a new ContentReference(1234) { ProviderName = "CatalogContent" } it works as expected, and I get my content back.
<p>Also, if I use <strong>_contentLoader.Get<IContent>(...)</strong> with my new, manually created <strong>ContentReference</strong>, it works. If I, however, try to say <strong>_contentLoader.Get<Bundle>(...) </strong>it gives me nothing.</p>
<p>After retrieving from <strong>IContentLoader</strong> as <strong>IContent</strong>, I can however say <strong>myContent as Bundle</strong> and get the proper Bundle object. <strong>Bundle</strong> does inherit from <strong>BundleContent</strong>, as one should be expecting.</p>
<p>And I now wish I could delete or edit my own posts or threads, cus this is just not true. My index was just ever so slightly out of sync with the database for some reason.</p>
<p><strong>Case closed!</strong></p>
In a scheduled job, I'm retrieving content that I've found via Find. When passing an instance of a EPiServer.Find.Cms.IndexableContentReference (that happens to point at a BundleContent) to IContentLoader, it throws an exception telling me it does not exist. This happens even if I say _contentLoader.Get<IContent>(...).
However, if I simply create a new ContentReference(1234) { ProviderName = "CatalogContent" } it works as expected, and I get my content back.
I guess this should be fixed in some way...