If a module that has an invalid NHibernate association is enabled, Orchard enters a non-recoverable state. If loading a module fails, it should be disabled so that Orchard can continue normally.
To reproduce this issue, create this sample module:
public class SamplePartRecord : ContentPartRecord {
public virtual MalformedRecord Other { get; set; }
}
public class MalformedRecord {
public string Name { get; set; } // "forgot" to make it virtual
}
public class Migrations : DataMigrationImpl {
public int Create() {
SchemaBuilder.CreateTable("MalformedRecord", table => table.Column("Name"));
SchemaBuilder.CreateTable("SamplePartRecord", table => table.ContentPartRecord().Column("MalformedRecord_Id"));
return 1;
}
}
hosamaly created: https://orchard.codeplex.com/workitem/17759
If a module that has an invalid NHibernate association is enabled, Orchard enters a non-recoverable state. If loading a module fails, it should be disabled so that Orchard can continue normally.
To reproduce this issue, create this sample module:
public class SamplePartRecord : ContentPartRecord { public virtual MalformedRecord Other { get; set; } }
public class MalformedRecord { public string Name { get; set; } // "forgot" to make it virtual }
public class Migrations : DataMigrationImpl { public int Create() { SchemaBuilder.CreateTable("MalformedRecord", table => table.Column("Name"));
SchemaBuilder.CreateTable("SamplePartRecord", table => table.ContentPartRecord().Column("MalformedRecord_Id"));
return 1;
}
}