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:
Lombiq
2016-01-27 20:17:03 +01:00
parent 58d480b87c
commit 8daad7f7a9

View File

@@ -76,6 +76,8 @@ namespace Orchard.ContentManagement {
((IShape)itemShape).Metadata.Alternates.Add(actualShapeType + "__" + content.ContentItem.ContentType);
var context = new BuildEditorContext(itemShape, content, groupId, _shapeFactory);
var workContext = _workContextAccessor.GetContext(_requestContext.HttpContext);
context.Layout = workContext.Layout;
BindPlacement(context, null, stereotype);
_handlers.Value.Invoke(handler => handler.BuildEditor(context), Logger);
@@ -104,6 +106,7 @@ namespace Orchard.ContentManagement {
((IShape)itemShape).Metadata.Alternates.Add(actualShapeType + "__" + content.ContentItem.ContentType);
var context = new UpdateEditorContext(itemShape, content, updater, groupInfoId, _shapeFactory, shapeTable, GetPath());
context.Layout = workContext.Layout;
BindPlacement(context, null, stereotype);
_handlers.Value.Invoke(handler => handler.UpdateEditor(context), Logger);