I developed a custom module "Milestones" with data type "Milestones" and singular type "Milestone". I'm then using an MVC widget to access the Milestones and display them in chronological order.
The code I use to read the items from the database:
var dynamicModuleManager = DynamicModuleManager.GetManager();
var milestoneType = TypeResolutionService.ResolveType(
var milestones = dynamicModuleManager.GetDataItems(milestoneType).Where(c => c.Status == ContentLifecycleStatus.Live);
var milestonesSorted = from milestone
I then loop through each item in milestonesSorted, create an object instance, and add it to a list. That list has two items for each entry in the Milestones module. When I display the status on output in the view, both copies of each record show "Live".
If I change the ContentLifecycleStatus.Live to ContentLifecycleStatus.Master, I still get duplicate records and the status on all shows "Master".
If I comment out the "Where" clause entirely, I get two copies of Live and two copies of Master that are output in the view.
In the Content>Milestones section of the Sitefinity backend, I see only the 6 separate items I created. In SQL Server Management studio for the dbo.milestone table, I see 12 entries, and for the dbo.milestone_sf_content_link, I also see 12 entries.
I understand that there should be twice as many rows in the table as there are in viewable in the backend because one is stored as Master and one as Live; However, I don't understand why I seem to output twice again that many with duplicates of both Master and Live.
I have tried unpublishing individual items, which makes no change in their visibility. Deleting items removes them, but once they're re-added, the duplicate problem is unchanged.