Content Part not displayed on editing view

Topics: Troubleshooting
Aug 14, 2014 at 3:56 PM
I already posted the question on stackoverflow.

I created a content part and added it to a content type. The databse is created with the correct fields, but when I want to create a content item of that type the fields are not displayed.<br>
My view is named Deposit.cshtml and is located under Views/EditorTemplates/Parts/Deposit.cshtml<br>
I already saw the log files, but there are no errors.<br>
I tried to debug the DepositPartDriver file, but the class is never called.

DepositPart.cs:
public class DepositPart : ContentPart<DepositPartRecord>
{
    public string Name
    {
        get { return Record.Name; }
        set { Record.Name = value; }
    }

    public string Currency
    {
        get { return Record.Currency; }
        set { Record.Currency = value; }
    }

    public virtual decimal Liquidity
    {
        get { return Record.Liquidity; }
        set { Record.Liquidity = value; }
    }

    public virtual int Month
    {
        get { return Record.Month; }
        set { Record.Month = value; }
    }

    public virtual string Url
    {
        get { return Record.Url; }
        set { Record.Url = value; }
    }
}

public class DepositPartRecord : ContentPartRecord
{
    public virtual string Name { get; set; }
    public virtual string Currency { get; set; }
    public virtual decimal Liquidity { get; set; }
    public virtual int Month { get; set; }
    public virtual string Url { get; set; }
}
Migrations.cs:
public class Migrations : DataMigrationImpl
{
    public int Create()
    {
        SchemaBuilder.CreateTable("DepositPartRecord", table => table
            .ContentPartRecord()
            .Column<string>("name", column => column.WithLength(50))
            .Column<string>("currency", column => column.WithLength(50))
            .Column<decimal>("liquidity")
            .Column<int>("month")
            .Column<string>("url", column => column.WithLength(50))
        );
        return 1;
    }

    public int UpdateFrom1()
    {
        ContentDefinitionManager.AlterPartDefinition("DepositPartRecord", part => part
            .Attachable());
        return 2;
    }
}
DepositPartHandler.cs:
public class DepositPartHandler : ContentHandler
{
    public DepositPartHandler(IRepository<DepositPartRecord> repository)
    {
        Filters.Add(StorageFilter.For(repository));
    }
}
DepositPartDriver.cs:
public class DepositPartDriver : ContentPartDriver<DepositPart>
{
    protected override string Prefix
    {
        get { return "Deposit"; }
    }

    protected override DriverResult Display(DepositPart part, string displayType, dynamic shapeHelper)
    {
        return ContentShape("Parts_Deposit", () => shapeHelper.Parts_Deposit());
    }

    protected override DriverResult Editor(DepositPart part, dynamic shapeHelper)
    {
        return ContentShape("Parts_Deposit_Edit", () => shapeHelper
            .EditorTemplate(TemplateName: "Parts/Deposit", Model: part, Prefix: Prefix));
    }

    protected override DriverResult Editor(DepositPart part, IUpdateModel updater, dynamic shapeHelper)
    {
        updater.TryUpdateModel(part, Prefix, null, null);
        return Editor(part, shapeHelper);
    }
}
Placement.info
<Placement>
  <Place Parts_Deposit="Content:1"/>
  <Place Parts_Deposit_Edit="Content:2"/>
</Placement>