• Not Answered

Relative Query in Sitecore 9.3 returns null

Hello All,

In Sitecore 8.1 update 3, below query was working fine.. but after upgrading to Sitecore 9.3. it does not return any thing, I have cross verified that items exist what this query should return. This query is in source column of a template field of type droplink.

query:./ancestor-or-self::*[@@templatename="Site"]/Data/Shared Content/Menus/Header/Main Menu/*[@@templatename="Folder"]
And in code wherever i have query like

var query= $"ancestor-or-self::*[@@templateid='{{{ISiteConstants.TemplateIdString.ToUpper()}}}']/Data/Settings/*[@@templateid='{{{IConfigurationConstants.TemplateIdString.ToUpper()}}}']"
and this statement does not return expected result except null value.

Same query with Sitecore 8.1 returns expected results.

Can anyone please let me know where is the issue with Sitecore 9.3 in this regard.