From 64585223eeb6acd49fe2768aa5ee24c5dd457595 Mon Sep 17 00:00:00 2001 From: Lombiq Date: Thu, 13 Aug 2015 17:02:50 +0200 Subject: [PATCH] Fixing that Layouts couldn't be export/imported properly because they lacked an identity --- src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs index 81a3142ba..c87ade13c 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Migrations.cs @@ -29,6 +29,7 @@ namespace Orchard.Layouts { .WithSetting("OwnerEditorSettings.ShowOwnerEditor", "false") .WithSetting("DateEditorSettings.ShowDateEditor", "false")) .WithPart("TitlePart") + .WithPart("IdentityPart") .WithPart("LayoutPart", p => p .WithSetting("LayoutTypePartSettings.IsTemplate", "True")) .DisplayedAs("Layout") @@ -62,7 +63,7 @@ namespace Orchard.Layouts { .WithPart("LayoutPart", p => p .WithSetting("LayoutTypePartSettings.IsTemplate", "False"))); - return 2; + return 3; } public int UpdateFrom1() { @@ -70,6 +71,13 @@ namespace Orchard.Layouts { return 2; } + public int UpdateFrom2() { + ContentDefinitionManager.AlterTypeDefinition("Layout", type => type + .WithPart("IdentityPart")); + + return 3; + } + private void DefineElementWidget(string widgetTypeName, string widgetDisplayedAs, string elementTypeName) { ContentDefinitionManager.AlterTypeDefinition(widgetTypeName, type => type .WithPart("CommonPart", p => p