mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 03:58:13 +08:00
#18399: Better error message when a shape is not available
Work Item: 18399 --HG-- branch : 1.x
This commit is contained in:
@@ -66,12 +66,12 @@ namespace Orchard.DisplayManagement.Implementation {
|
||||
ShapeBinding shapeBinding;
|
||||
if (TryGetDescriptorBinding(shapeMetadata.Type, Enumerable.Empty<string>(), shapeTable, out shapeBinding)) {
|
||||
shapeBinding.ShapeDescriptor.Displaying.Invoke(action => action(displayingContext), Logger);
|
||||
}
|
||||
|
||||
// copy all binding sources (all templates for this shape) in order to use them as Localization scopes
|
||||
shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources.Where(x => x != null).ToList();
|
||||
if (!shapeMetadata.BindingSources.Any()) {
|
||||
shapeMetadata.BindingSources.Add(shapeBinding.ShapeDescriptor.BindingSource);
|
||||
// copy all binding sources (all templates for this shape) in order to use them as Localization scopes
|
||||
shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources.Where(x => x != null).ToList();
|
||||
if (!shapeMetadata.BindingSources.Any()) {
|
||||
shapeMetadata.BindingSources.Add(shapeBinding.ShapeDescriptor.BindingSource);
|
||||
}
|
||||
}
|
||||
|
||||
// invoking ShapeMetadata displaying events
|
||||
|
||||
Reference in New Issue
Block a user