From 9dc53c6c1bfbb7798d53a3c811087672ef9b3125 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 1 Feb 2012 14:46:25 -0800 Subject: [PATCH] #18399: Better error message when a shape is not available Work Item: 18399 --HG-- branch : 1.x --- .../Implementation/DefaultDisplayManager.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs b/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs index 9e700b34e..2f59226b8 100644 --- a/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs +++ b/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs @@ -66,12 +66,12 @@ namespace Orchard.DisplayManagement.Implementation { ShapeBinding shapeBinding; if (TryGetDescriptorBinding(shapeMetadata.Type, Enumerable.Empty(), 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