diff --git a/src/Umbraco.Web/DefaultPublishedContentStore.cs b/src/Umbraco.Web/DefaultPublishedContentStore.cs index 1b8dfddc7c..bb54717c26 100644 --- a/src/Umbraco.Web/DefaultPublishedContentStore.cs +++ b/src/Umbraco.Web/DefaultPublishedContentStore.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web DescendantDocumentById = "//node [@id={0}]"; DescendantDocumentByAlias = "//node[(" + "contains(concat(',',translate(data [@alias='umbracoUrlAlias'], ' ', ''),','),',{0},')" - + " or contains(concat(',',translate(data [@alias='umbracoUrlAlias'], ' ', ''),','),',/{0},'" + + " or contains(concat(',',translate(data [@alias='umbracoUrlAlias'], ' ', ''),','),',/{0},')" + ")]"; ChildDocumentByUrlName = "/node [@urlName='{0}']"; RootDocumentWithLowestSortOrder = "/root/node [not(@sortOrder > ../node/@sortOrder)][1]"; diff --git a/src/umbraco.cms/businesslogic/web/Document.cs b/src/umbraco.cms/businesslogic/web/Document.cs index 04cac5e3a1..2b3df3fe79 100644 --- a/src/umbraco.cms/businesslogic/web/Document.cs +++ b/src/umbraco.cms/businesslogic/web/Document.cs @@ -781,7 +781,7 @@ namespace umbraco.cms.businesslogic.web int x = SqlHelper.ExecuteScalar(@"select count(node.id) - count(doc.nodeid) from umbracoNode as node left join cmsDocument as doc on (node.id=doc.nodeId and doc.published=1) -where '" + Path + ",' like " + SqlHelper.Concat("node.path", "'%'")); +where '" + Path + ",' like " + SqlHelper.Concat("node.path", "',%'")); return (x == 1); } }