mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-22 03:37:25 +08:00
Fixing that specifying a global zone as an editor shape's placement caused NRE, fixes #4913
E.g. something like this didn't work: Parts_Title_Edit = "/Navigation: 5"
This commit is contained in:
@@ -76,6 +76,8 @@ namespace Orchard.ContentManagement {
|
|||||||
((IShape)itemShape).Metadata.Alternates.Add(actualShapeType + "__" + content.ContentItem.ContentType);
|
((IShape)itemShape).Metadata.Alternates.Add(actualShapeType + "__" + content.ContentItem.ContentType);
|
||||||
|
|
||||||
var context = new BuildEditorContext(itemShape, content, groupId, _shapeFactory);
|
var context = new BuildEditorContext(itemShape, content, groupId, _shapeFactory);
|
||||||
|
var workContext = _workContextAccessor.GetContext(_requestContext.HttpContext);
|
||||||
|
context.Layout = workContext.Layout;
|
||||||
BindPlacement(context, null, stereotype);
|
BindPlacement(context, null, stereotype);
|
||||||
|
|
||||||
_handlers.Value.Invoke(handler => handler.BuildEditor(context), Logger);
|
_handlers.Value.Invoke(handler => handler.BuildEditor(context), Logger);
|
||||||
@@ -104,6 +106,7 @@ namespace Orchard.ContentManagement {
|
|||||||
((IShape)itemShape).Metadata.Alternates.Add(actualShapeType + "__" + content.ContentItem.ContentType);
|
((IShape)itemShape).Metadata.Alternates.Add(actualShapeType + "__" + content.ContentItem.ContentType);
|
||||||
|
|
||||||
var context = new UpdateEditorContext(itemShape, content, updater, groupInfoId, _shapeFactory, shapeTable, GetPath());
|
var context = new UpdateEditorContext(itemShape, content, updater, groupInfoId, _shapeFactory, shapeTable, GetPath());
|
||||||
|
context.Layout = workContext.Layout;
|
||||||
BindPlacement(context, null, stereotype);
|
BindPlacement(context, null, stereotype);
|
||||||
|
|
||||||
_handlers.Value.Invoke(handler => handler.UpdateEditor(context), Logger);
|
_handlers.Value.Invoke(handler => handler.UpdateEditor(context), Logger);
|
||||||
|
Reference in New Issue
Block a user