From dd210ab801e9f7c41c9b2b21db62fdc5df37d1c1 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Tue, 5 Apr 2011 13:10:23 -0700 Subject: [PATCH] Ensuring the layer change when editing a widget overrides the persisted container ID from the CommonPart work item: 17650 --HG-- branch : 1.x --- .../Modules/Orchard.Widgets/Controllers/AdminController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs index 9603e14fa..33082b2e8 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs @@ -344,8 +344,9 @@ namespace Orchard.Widgets.Controllers { if (widgetPart == null) return HttpNotFound(); - widgetPart.LayerPart = _widgetsService.GetLayer(layerId); var model = Services.ContentManager.UpdateEditor(widgetPart, this); + // override the CommonPart's persisting of the current container + widgetPart.LayerPart = _widgetsService.GetLayer(layerId); if (!ModelState.IsValid) { Services.TransactionManager.Cancel(); // Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.