IContentLoader always returns null/throws Exception when getting


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...

Oct 17, 2014 13:44
<p>Do you get the issue while running the Job manually also?<br />/K</p>
Oct 17, 2014 14:02
<p>Also, if I use <strong>_contentLoader.Get&lt;IContent&gt;(...)</strong> with my new, manually created <strong>ContentReference</strong>, it works. If I, however, try to say <strong>_contentLoader.Get&lt;Bundle&gt;(...) </strong>it gives me nothing.</p> <p>After retrieving from <strong>IContentLoader</strong> as <strong>IContent</strong>, I can however say&nbsp;<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>
Oct 17, 2014 14:04
<p>K Khan: Yes.</p>
Oct 17, 2014 14:05
<p>And I now wish I could delete or edit my own posts or threads, cus this is just not true.&nbsp;My index was just ever so slightly out of sync with the database for some reason.</p> <p><strong>Case closed!</strong></p>
Oct 17, 2014 14:17
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.