This project is read-only.

Fields omitted from display based on binding type

Topics: Customizing Orchard
Nov 11, 2014 at 6:53 PM
Edited Nov 11, 2014 at 7:07 PM

I recently switched part binding for a custom content type from the migrations style over to the ActivatingFilter methodology. I noticed that date fields were being omitted from both the new and edit pages. At first I thought I had somehow screwed up the placement file or binding of the field itself. Finally, I switched back to the migrations methodology and suddenly my date fields reappeared.

Here's a snippet of the ActivatingFilter call in the appropriate handler...
Filters.Add(new ActivatingFilter<MyPart>("My Custom Type"));
The part migration code adds the datetimefield in the following manner...
ContentDefinitionManager.AlterPartDefinition("MyPart", builder => builder.WithField("StartDate", field => field.OfType("DateTimeField")
                              .WithDisplayName("Start Date")
                              .WithSetting("DateTimeFieldSettings.Display", "DateAndTime"))
                              .WithSetting("DateTimeFieldSettings.Required", "False"));
Content type creation is done via.. note: if I use the ActivatingFilter, I won't bind using WithPart("MyPart").
  ContentDefinitionManager.AlterTypeDefinition("My Custom Type",
        builder => builder.WithPart("MyPart"));
Why would dynamic binding via the ActivatingFilter force my datetime fields to not work? Am I doing something wrong in the part creation code (or elsewhere), is this a limitation of dynamic part binding, or is this a bug?