From 98b8ccfb5c362c07c3835100a49682f5bbbf1a6c Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 15 Dec 2011 18:19:27 -0800 Subject: [PATCH] #18192: Fixing localization Work Item: 18192 --HG-- branch : 1.x --- .../Implementation/DefaultDisplayManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs b/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs index cec8f4657..9e700b34e 100644 --- a/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs +++ b/src/Orchard/DisplayManagement/Implementation/DefaultDisplayManager.cs @@ -69,7 +69,10 @@ namespace Orchard.DisplayManagement.Implementation { } // copy all binding sources (all templates for this shape) in order to use them as Localization scopes - shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources; + shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources.Where(x => x != null).ToList(); + if (!shapeMetadata.BindingSources.Any()) { + shapeMetadata.BindingSources.Add(shapeBinding.ShapeDescriptor.BindingSource); + } // invoking ShapeMetadata displaying events shapeMetadata.Displaying.Invoke(action => action(displayingContext), Logger);