From d74965fdd4541a302a9e0ee00aba4da0dd34cd8d Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 23 Oct 2013 15:23:42 -0700 Subject: [PATCH] #20065: Fixing placement parsing Work Item: 20065 --- .../ShapePlacementStrategy/ShapePlacementParsingStrategy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs index 73f0d3981..80d24734b 100644 --- a/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs +++ b/src/Orchard/DisplayManagement/Descriptors/ShapePlacementStrategy/ShapePlacementParsingStrategy.cs @@ -139,7 +139,7 @@ namespace Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy { if (normalizedPath.EndsWith("*")) { var prefix = normalizedPath.Substring(0, normalizedPath.Length - 1); - return ctx => VirtualPathUtility.ToAppRelative(ctx.Path ?? "/").StartsWith(prefix, StringComparison.OrdinalIgnoreCase) && predicate(ctx); + return ctx => VirtualPathUtility.ToAppRelative(String.IsNullOrEmpty(ctx.Path) ? "/" : ctx.Path).StartsWith(prefix, StringComparison.OrdinalIgnoreCase) && predicate(ctx); } normalizedPath = VirtualPathUtility.AppendTrailingSlash(normalizedPath);