mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Ensuring the layer change when adding a widget overrides the persisted container ID from the CommonPart
work item: 17671 --HG-- branch : 1.x
This commit is contained in:
@@ -177,6 +177,8 @@ namespace Orchard.Widgets.Controllers {
|
||||
return HttpNotFound();
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user