Jul 23, 2013 at 9:30 PM
Edited Jul 23, 2013 at 9:30 PM
I'm creating a module to support podcasting, very similar to the blogs module where you have a podcast that contains multiple episodes. I'm modeling this module after the blogs module, but i'm having trouble coding the part when creating a new episode
in the admin site.
The error occurs in my admin controller when I call this:
var podcastEpisode = Services.ContentManager.New<PodcastEpisodePart>("PodcastEpisode");
Picking through it, the exception happens here:
Specifically when it calls contentItem.Get<T>()
The error is that the content item that was created does not contain my PodcastEpisodePart. I've been picking through the blogs module trying to see how this is getting added but I can't find it. In my migrations.cs, I can verify I have added the part when
altering the type definition, just like the Blogs module, but somehow this part isn't being created in the content manager.
One difference is unlike the Blogs module, instead of how the BlogPost part isn't based on a record, my PodcastEpisodePart is based on my PodcastEpisodePart record as I need to store a few extra fields for each episode.
Any ideas as to what I'm missing?