diff --git a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs index 415240e017..e5424fb636 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs @@ -24,6 +24,8 @@ public class ContentErrorPage : ValidatableEntryBase /// /// Gets or sets a value for the content XPath. /// + + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public string? ContentXPath { get; set; } /// @@ -39,6 +41,7 @@ public class ContentErrorPage : ValidatableEntryBase /// /// Gets a value indicating whether the field is populated. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public bool HasContentXPath => !string.IsNullOrEmpty(ContentXPath); /// diff --git a/src/Umbraco.Core/Extensions/XmlExtensions.cs b/src/Umbraco.Core/Extensions/XmlExtensions.cs index 34e2b7b2aa..bb9e6c69b5 100644 --- a/src/Umbraco.Core/Extensions/XmlExtensions.cs +++ b/src/Umbraco.Core/Extensions/XmlExtensions.cs @@ -34,6 +34,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNodeList? SelectNodes(this XmlNode source, string expression, IEnumerable? variables) { XPathVariable[]? av = variables?.ToArray(); @@ -56,6 +57,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNodeList? SelectNodes(this XmlNode source, XPathExpression expression, IEnumerable? variables) { XPathVariable[]? av = variables?.ToArray(); @@ -78,6 +80,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNodeList? SelectNodes(this XmlNode source, string? expression, params XPathVariable[]? variables) { if (variables == null || variables.Length == 0 || variables[0] == null) @@ -105,6 +108,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNodeList SelectNodes(this XmlNode source, XPathExpression expression, params XPathVariable[]? variables) { if (variables == null || variables.Length == 0 || variables[0] == null) @@ -132,6 +136,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNode? SelectSingleNode(this XmlNode source, string expression, IEnumerable? variables) { XPathVariable[]? av = variables?.ToArray(); @@ -154,6 +159,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNode? SelectSingleNode(this XmlNode source, XPathExpression expression, IEnumerable? variables) { XPathVariable[]? av = variables?.ToArray(); @@ -176,6 +182,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNode? SelectSingleNode(this XmlNode source, string expression, params XPathVariable[]? variables) { if (variables == null || variables.Length == 0 || variables[0] == null) @@ -202,6 +209,7 @@ public static class XmlExtensions /// /// The XPath expression should reference variables as $var. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNode? SelectSingleNode(this XmlNode source, XPathExpression expression, params XPathVariable[]? variables) { if (variables == null || variables.Length == 0 || variables[0] == null) diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs index a7bff33ba4..ed175e418d 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs @@ -69,6 +69,8 @@ public interface IPublishedProperty /// It must be either null, or a string, or an XPathNavigator. /// It has been fully prepared and processed by the appropriate converter. /// + + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] object? GetXPathValue(string? culture = null, string? segment = null); /// diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs index 83ca0c49df..45d36abb6a 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs @@ -113,6 +113,7 @@ public interface IPublishedPropertyType /// /// The XPath value can be either a string or an XPathNavigator. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] object? ConvertInterToXPath(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview); /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs index a06d2006ba..c36809600b 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs @@ -46,6 +46,7 @@ public abstract class PublishedPropertyBase : IPublishedProperty public abstract object? GetValue(string? culture = null, string? segment = null); /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public abstract object? GetXPathValue(string? culture = null, string? segment = null); /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs index 0efa4e7653..848e961d0b 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs @@ -273,6 +273,7 @@ namespace Umbraco.Cms.Core.Models.PublishedContent } /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public object? ConvertInterToXPath(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) { if (!_initialized) diff --git a/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs b/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs index 3d29744bac..013f969805 100644 --- a/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs +++ b/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs @@ -58,6 +58,7 @@ public class RawValueProperty : PublishedPropertyBase public override object? GetValue(string? culture = null, string? segment = null) => string.IsNullOrEmpty(culture) & string.IsNullOrEmpty(segment) ? _objectValue.Value : null; + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? GetXPathValue(string? culture = null, string? segment = null) => string.IsNullOrEmpty(culture) & string.IsNullOrEmpty(segment) ? _xpathValue.Value : null; diff --git a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs index 37d6b82475..74dbeaebae 100644 --- a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs @@ -128,5 +128,6 @@ public interface IPropertyValueConverter : IDiscoverable /// the cache levels of property values. It is not meant to be used by the converter. /// /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview); } diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs index 3066086e7b..33c86f3ef4 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs @@ -49,6 +49,7 @@ public abstract class PropertyValueConverterBase : IPropertyValueConverter => inter; /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public virtual object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) { var d = new XmlDocument(); diff --git a/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs index 6c9c80ce81..fc7651b801 100644 --- a/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs @@ -51,6 +51,7 @@ public class TextStringValueConverter : PropertyValueConverterBase, IDeliveryApi // source should come from ConvertSource and be a string (or null) already inter ?? string.Empty; + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) => // source should come from ConvertSource and be a string (or null) already diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs index 06bfd1b1f2..94f2533548 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs @@ -86,6 +86,7 @@ public class ContentPickerValueConverter : PropertyValueConverterBase, IDelivery return content ?? inter; } + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) { if (inter == null) diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs index 7941946964..73ef424ba4 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs @@ -39,6 +39,7 @@ public class DatePickerValueConverter : PropertyValueConverterBase } // default ConvertSourceToObject just returns source ie a DateTime value + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? ConvertIntermediateToXPath( IPublishedElement owner, IPublishedPropertyType propertyType, diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs index 3d631afead..e3dcd6ae78 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs @@ -57,6 +57,7 @@ public class MultipleTextStringValueConverter : PropertyValueConverterBase : values.ToArray(); } + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) { var d = new XmlDocument(); diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs index 7503e6711f..8e0aa50acf 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs @@ -31,6 +31,7 @@ public class SimpleTinyMceValueConverter : PropertyValueConverterBase // source should come from ConvertSource and be a string (or null) already new HtmlEncodedString(inter == null ? string.Empty : (string)inter); + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) => // source should come from ConvertSource and be a string (or null) already diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs index ab7f99e7f8..7bc940f90f 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs @@ -56,6 +56,7 @@ public class YesNoValueConverter : PropertyValueConverterBase } // default ConvertSourceToObject just returns source ie a boolean value + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) => // source should come from ConvertSource and be a boolean already diff --git a/src/Umbraco.Core/PublishedCache/IPublishedCache.cs b/src/Umbraco.Core/PublishedCache/IPublishedCache.cs index 0ee2ca38ed..78ebd19d6a 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedCache.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedCache.cs @@ -102,6 +102,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The content, or null. /// The value of overrides defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IPublishedContent? GetSingleByXPath(bool preview, string xpath, params XPathVariable[] vars); /// @@ -111,6 +112,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The content, or null. /// Considers published or unpublished content depending on defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IPublishedContent? GetSingleByXPath(string xpath, params XPathVariable[] vars); /// @@ -121,6 +123,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The content, or null. /// The value of overrides defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IPublishedContent? GetSingleByXPath(bool preview, XPathExpression xpath, params XPathVariable[] vars); /// @@ -130,6 +133,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The content, or null. /// Considers published or unpublished content depending on defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IPublishedContent? GetSingleByXPath(XPathExpression xpath, params XPathVariable[] vars); /// @@ -140,6 +144,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The contents. /// The value of overrides defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IEnumerable GetByXPath(bool preview, string xpath, params XPathVariable[] vars); /// @@ -149,6 +154,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The contents. /// Considers published or unpublished content depending on defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IEnumerable GetByXPath(string xpath, params XPathVariable[] vars); /// @@ -159,6 +165,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The contents. /// The value of overrides defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IEnumerable GetByXPath(bool preview, XPathExpression xpath, params XPathVariable[] vars); /// @@ -168,6 +175,7 @@ public interface IPublishedCache : IXPathNavigable /// Optional XPath variables. /// The contents. /// Considers published or unpublished content depending on defaults. + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IEnumerable GetByXPath(XPathExpression xpath, params XPathVariable[] vars); /// @@ -179,6 +187,7 @@ public interface IPublishedCache : IXPathNavigable /// The value of overrides the context. /// The navigator is already a safe clone (no need to clone it again). /// + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] XPathNavigator CreateNavigator(bool preview); /// @@ -196,6 +205,7 @@ public interface IPublishedCache : IXPathNavigable /// /// If the node does not exist, returns null. /// + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] XPathNavigator? CreateNodeNavigator(int id, bool preview); /// diff --git a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs index e4e9010f5b..315136612a 100644 --- a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs +++ b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedContentCache.cs @@ -38,20 +38,26 @@ public sealed class InternalPublishedContentCache : PublishedCacheBase, IPublish public override IEnumerable GetAtRoot(bool preview, string? culture = null) => _content.Values.Where(x => x.Parent == null); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IPublishedContent GetSingleByXPath(bool preview, string xpath, XPathVariable[] vars) => throw new NotImplementedException(); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IPublishedContent GetSingleByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars) => throw new NotImplementedException(); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IEnumerable GetByXPath(bool preview, string xpath, XPathVariable[] vars) => throw new NotImplementedException(); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IEnumerable GetByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars) => throw new NotImplementedException(); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override XPathNavigator CreateNavigator(bool preview) => throw new NotImplementedException(); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override XPathNavigator CreateNodeNavigator(int id, bool preview) => throw new NotImplementedException(); public override bool HasContent(bool preview) => _content.Count > 0; diff --git a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs index a90897e221..c0d76aceb8 100644 --- a/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs +++ b/src/Umbraco.Core/PublishedCache/Internal/InternalPublishedProperty.cs @@ -13,6 +13,7 @@ public class InternalPublishedProperty : IPublishedProperty public bool SolidHasValue { get; set; } + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public object? SolidXPathValue { get; set; } public object? SolidDeliveryApiValue { get; set; } @@ -25,6 +26,7 @@ public class InternalPublishedProperty : IPublishedProperty public virtual object? GetValue(string? culture = null, string? segment = null) => SolidValue; + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public virtual object? GetXPathValue(string? culture = null, string? segment = null) => SolidXPathValue; public virtual object? GetDeliveryApiValue(bool expanding, string? culture = null, string? segment = null) => SolidDeliveryApiValue; diff --git a/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs b/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs index 3e961ce434..c20ebf9284 100644 --- a/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs +++ b/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs @@ -40,31 +40,42 @@ public abstract class PublishedCacheBase : IPublishedCache public IEnumerable GetAtRoot(string? culture = null) => GetAtRoot(PreviewDefault, culture); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public abstract IPublishedContent? GetSingleByXPath(bool preview, string xpath, XPathVariable[] vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IPublishedContent? GetSingleByXPath(string xpath, XPathVariable[] vars) => GetSingleByXPath(PreviewDefault, xpath, vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public abstract IPublishedContent? GetSingleByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IPublishedContent? GetSingleByXPath(XPathExpression xpath, XPathVariable[] vars) => GetSingleByXPath(PreviewDefault, xpath, vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public abstract IEnumerable GetByXPath(bool preview, string xpath, XPathVariable[] vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IEnumerable GetByXPath(string xpath, XPathVariable[] vars) => GetByXPath(PreviewDefault, xpath, vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public abstract IEnumerable GetByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IEnumerable GetByXPath(XPathExpression xpath, XPathVariable[] vars) => GetByXPath(PreviewDefault, xpath, vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public abstract XPathNavigator CreateNavigator(bool preview); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public XPathNavigator CreateNavigator() => CreateNavigator(PreviewDefault); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public abstract XPathNavigator? CreateNodeNavigator(int id, bool preview); public abstract bool HasContent(bool preview); diff --git a/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs b/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs index b4e56897a7..05348a138c 100644 --- a/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs +++ b/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs @@ -201,6 +201,7 @@ internal class PublishedElementPropertyBase : PublishedPropertyBase } } + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? GetXPathValue(string? culture = null, string? segment = null) { GetCacheLevels(out PropertyCacheLevel cacheLevel, out PropertyCacheLevel referenceCacheLevel); diff --git a/src/Umbraco.Core/Xml/DynamicContext.cs b/src/Umbraco.Core/Xml/DynamicContext.cs index fd86866348..321024f486 100644 --- a/src/Umbraco.Core/Xml/DynamicContext.cs +++ b/src/Umbraco.Core/Xml/DynamicContext.cs @@ -118,6 +118,7 @@ namespace Umbraco.Cms.Core.Xml /// /// Same as . /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override bool PreserveWhitespace(XPathNavigator node) { return true; @@ -140,6 +141,7 @@ namespace Umbraco.Cms.Core.Xml /// /// The expression to compile /// A compiled . + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XPathExpression? Compile(string xpath) { return new XmlDocument().CreateNavigator()?.Compile(xpath); @@ -203,6 +205,7 @@ namespace Umbraco.Cms.Core.Xml /// /// See . Not used in our implementation. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IXsltContextFunction ResolveFunction(string prefix, string name, XPathResultType[] argTypes) => throw new NotImplementedException(); /// diff --git a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs index 2a01d42dc7..87d4d459fa 100644 --- a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs +++ b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs @@ -6,6 +6,7 @@ namespace Umbraco.Cms.Core.Xml; /// This is used to parse our customize Umbraco XPath expressions (i.e. that include special tokens like $site) into /// a real XPath statement /// +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public class UmbracoXPathPathSyntaxParser { [Obsolete("This will be removed in Umbraco 13. Use ParseXPathQuery which accepts a parentId instead")] diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs index b9359b4fef..8d9d48a0a0 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs @@ -3,6 +3,7 @@ namespace Umbraco.Cms.Core.Xml.XPath; /// /// Represents a content that can be navigated via XPath. /// +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public interface INavigableContent { /// diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs b/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs index 08a7c1a0f6..eeb775e07b 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs @@ -3,6 +3,7 @@ namespace Umbraco.Cms.Core.Xml.XPath; /// /// Represents the type of a content that can be navigated via XPath. /// +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public interface INavigableContentType { /// diff --git a/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs b/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs index 28fa46e84b..faaa612474 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs @@ -4,6 +4,7 @@ namespace Umbraco.Cms.Core.Xml.XPath; /// Represents the type of a field of a content that can be navigated via XPath. /// /// A field can be an attribute or a property. +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public interface INavigableFieldType { /// diff --git a/src/Umbraco.Core/Xml/XPath/INavigableSource.cs b/src/Umbraco.Core/Xml/XPath/INavigableSource.cs index 1f8500725b..459f1bf606 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableSource.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableSource.cs @@ -3,6 +3,7 @@ namespace Umbraco.Cms.Core.Xml.XPath; /// /// Represents a source of content that can be navigated via XPath. /// +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public interface INavigableSource { /// diff --git a/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs b/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs index dd27e6124c..3d706eed80 100644 --- a/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs +++ b/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs @@ -7,6 +7,7 @@ namespace Umbraco.Cms.Core.Xml.XPath /// /// Provides a cursor model for navigating {macro /} as if it were XML. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public class MacroNavigator : XPathNavigator { private readonly XmlNameTable _nameTable; diff --git a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs index 3529f55922..020f753165 100644 --- a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs +++ b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs @@ -21,6 +21,8 @@ namespace Umbraco.Cms.Core.Xml.XPath; /// /// Provides a cursor model for navigating Umbraco data as if it were XML. /// + +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public class NavigableNavigator : XPathNavigator { // "The XmlNameTable stores atomized strings of any local name, namespace URI, diff --git a/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs b/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs index 1b710c8db5..63fa9ef263 100644 --- a/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs +++ b/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs @@ -3,6 +3,7 @@ using System.Xml.XPath; namespace Umbraco.Cms.Core.Xml.XPath; +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public class RenamedRootNavigator : XPathNavigator { private readonly XPathNavigator _navigator; diff --git a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs index 44cda2c691..09bd34f692 100644 --- a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs +++ b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs @@ -18,6 +18,7 @@ public static class XPathNavigatorExtensions /// An XPath expression. /// A set of XPathVariables. /// An iterator over the nodes matching the specified expression. + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XPathNodeIterator Select(this XPathNavigator navigator, string expression, params XPathVariable[] variables) { if (variables == null || variables.Length == 0 || variables[0] == null) @@ -50,6 +51,7 @@ public static class XPathNavigatorExtensions /// An XPath expression. /// A set of XPathVariables. /// An iterator over the nodes matching the specified expression. + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XPathNodeIterator Select(this XPathNavigator navigator, XPathExpression expression, params XPathVariable[] variables) { if (variables == null || variables.Length == 0 || variables[0] == null) diff --git a/src/Umbraco.Core/Xml/XPathVariable.cs b/src/Umbraco.Core/Xml/XPathVariable.cs index 4c2d2d0f4e..675485e551 100644 --- a/src/Umbraco.Core/Xml/XPathVariable.cs +++ b/src/Umbraco.Core/Xml/XPathVariable.cs @@ -6,6 +6,7 @@ namespace Umbraco.Cms.Core.Xml; /// Represents a variable in an XPath query. /// /// The name must be foo in the constructor and $foo in the XPath query. +[Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public class XPathVariable { /// diff --git a/src/Umbraco.Core/Xml/XmlHelper.cs b/src/Umbraco.Core/Xml/XmlHelper.cs index ad97120c93..a2165fdd39 100644 --- a/src/Umbraco.Core/Xml/XmlHelper.cs +++ b/src/Umbraco.Core/Xml/XmlHelper.cs @@ -76,6 +76,7 @@ public class XmlHelper /// /// The xml string. /// An XPathDocument created from the xml string. + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XPathDocument CreateXPathDocument(string xml) => new XPathDocument(new XmlTextReader(new StringReader(xml))); @@ -85,6 +86,7 @@ public class XmlHelper /// The xml string. /// The XPath document. /// A value indicating whether it has been possible to create the document. + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static bool TryCreateXPathDocument(string xml, out XPathDocument? doc) { try @@ -106,6 +108,7 @@ public class XmlHelper /// The XPath document. /// A value indicating whether it has been possible to create the document. /// The value can be anything... Performance-wise, this is bad. + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static bool TryCreateXPathDocumentFromPropertyValue(object value, out XPathDocument? doc) { // DynamicNode.ConvertPropertyValueByDataType first cleans the value by calling @@ -155,6 +158,7 @@ public class XmlHelper /// The parent node. /// An XPath expression to select children of to sort. /// A function returning the value to order the nodes by. + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static void SortNodes( XmlNode parentNode, string childNodesXPath, @@ -187,6 +191,7 @@ public class XmlHelper /// Assuming all nodes but are sorted, this will move the node to /// the right position without moving all the nodes (as SortNodes would do) - should improve perfs. /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static bool SortNode( XmlNode parentNode, string childNodesXPath, diff --git a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs index 17c2f41843..8031ca0bf0 100644 --- a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs +++ b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs @@ -27,6 +27,7 @@ public class XmlNodeListFactory /// an object inheriting , such as /// . /// + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public static XmlNodeList CreateNodeList(XPathNodeIterator? iterator) => new XmlNodeListIterator(iterator); #endregion Public members diff --git a/src/Umbraco.Infrastructure/IPublishedContentQuery.cs b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs index cc034e5768..6e82239dac 100644 --- a/src/Umbraco.Infrastructure/IPublishedContentQuery.cs +++ b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs @@ -18,6 +18,7 @@ public interface IPublishedContentQuery IPublishedContent? Content(object id); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IPublishedContent? ContentSingleAtXPath(string xpath, params XPathVariable[] vars); IEnumerable Content(IEnumerable ids); @@ -26,8 +27,10 @@ public interface IPublishedContentQuery IEnumerable Content(IEnumerable ids); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IEnumerable ContentAtXPath(string xpath, params XPathVariable[] vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] IEnumerable ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars); IEnumerable ContentAtRoot(); diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs index 9aeeb02d92..178778483d 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs @@ -56,6 +56,7 @@ public class MarkdownEditorValueConverter : PropertyValueConverterBase, IDeliver return new HtmlEncodedString(inter == null ? string.Empty : mark.Transform((string)inter)); } + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview) => // source should come from ConvertSource and be a string (or null) already diff --git a/src/Umbraco.Infrastructure/PublishedContentQuery.cs b/src/Umbraco.Infrastructure/PublishedContentQuery.cs index ef16aeccc6..d075e8b9d2 100644 --- a/src/Umbraco.Infrastructure/PublishedContentQuery.cs +++ b/src/Umbraco.Infrastructure/PublishedContentQuery.cs @@ -129,6 +129,7 @@ public class PublishedContentQuery : IPublishedContentQuery return null; } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IPublishedContent? ContentSingleAtXPath(string xpath, params XPathVariable[] vars) => ItemByXPath(xpath, vars, _publishedSnapshot.Content); @@ -141,9 +142,11 @@ public class PublishedContentQuery : IPublishedContentQuery public IEnumerable Content(IEnumerable ids) => ids.Select(Content).WhereNotNull(); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IEnumerable ContentAtXPath(string xpath, params XPathVariable[] vars) => ItemsByXPath(xpath, vars, _publishedSnapshot.Content); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IEnumerable ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars) => ItemsByXPath(xpath, vars, _publishedSnapshot.Content); diff --git a/src/Umbraco.PublishedCache.NuCache/ContentCache.cs b/src/Umbraco.PublishedCache.NuCache/ContentCache.cs index d8a5c0bc04..d854de4b95 100644 --- a/src/Umbraco.PublishedCache.NuCache/ContentCache.cs +++ b/src/Umbraco.PublishedCache.NuCache/ContentCache.cs @@ -360,6 +360,7 @@ public class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigab ? _snapshot.IsEmpty == false : _snapshot.GetAtRoot().Any(x => x.PublishedModel != null); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IPublishedContent? GetSingleByXPath(bool preview, string xpath, XPathVariable[] vars) { XPathNavigator navigator = CreateNavigator(preview); @@ -367,6 +368,7 @@ public class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigab return GetSingleByXPath(iterator); } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IPublishedContent? GetSingleByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars) { XPathNavigator navigator = CreateNavigator(preview); @@ -386,6 +388,7 @@ public class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigab return xcontent?.InnerContent; } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IEnumerable GetByXPath(bool preview, string xpath, XPathVariable[] vars) { XPathNavigator navigator = CreateNavigator(preview); @@ -393,6 +396,7 @@ public class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigab return GetByXPath(iterator); } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IEnumerable GetByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars) { XPathNavigator navigator = CreateNavigator(preview); @@ -416,6 +420,7 @@ public class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigab } } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override XPathNavigator CreateNavigator(bool preview) { var source = new Source(this, preview); @@ -423,6 +428,7 @@ public class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigab return navigator; } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override XPathNavigator? CreateNodeNavigator(int id, bool preview) { var source = new Source(this, preview); diff --git a/src/Umbraco.PublishedCache.NuCache/MediaCache.cs b/src/Umbraco.PublishedCache.NuCache/MediaCache.cs index 626e2fe36c..014140e884 100644 --- a/src/Umbraco.PublishedCache.NuCache/MediaCache.cs +++ b/src/Umbraco.PublishedCache.NuCache/MediaCache.cs @@ -95,6 +95,7 @@ public class MediaCache : PublishedCacheBase, IPublishedMediaCache, INavigableDa #region XPath + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IPublishedContent? GetSingleByXPath(bool preview, string xpath, XPathVariable[] vars) { XPathNavigator navigator = CreateNavigator(preview); @@ -102,6 +103,7 @@ public class MediaCache : PublishedCacheBase, IPublishedMediaCache, INavigableDa return GetSingleByXPath(iterator); } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IPublishedContent? GetSingleByXPath(bool preview, XPathExpression xpath, XPathVariable[] vars) { XPathNavigator navigator = CreateNavigator(preview); @@ -109,6 +111,7 @@ public class MediaCache : PublishedCacheBase, IPublishedMediaCache, INavigableDa return GetSingleByXPath(iterator); } + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override IEnumerable GetByXPath(bool preview, string xpath, XPathVariable[] vars) { XPathNavigator navigator = CreateNavigator(preview); diff --git a/src/Umbraco.PublishedCache.NuCache/Property.cs b/src/Umbraco.PublishedCache.NuCache/Property.cs index d50553d95f..e86f6f4ad9 100644 --- a/src/Umbraco.PublishedCache.NuCache/Property.cs +++ b/src/Umbraco.PublishedCache.NuCache/Property.cs @@ -288,6 +288,7 @@ internal class Property : PublishedPropertyBase return value; } + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public override object? GetXPathValue(string? culture = null, string? segment = null) { _content.VariationContextAccessor.ContextualizeVariation(_variations, _content.Id, ref culture, ref segment); diff --git a/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs b/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs index 750d60d67e..036397cb4d 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/EntityController.cs @@ -533,6 +533,7 @@ public class EntityController : UmbracoAuthorizedJsonController /// /// /// + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public ActionResult? GetByXPath(string query, int nodeContextId, int? parentId, UmbracoEntityTypes type) { if (type != UmbracoEntityTypes.Document) diff --git a/src/Umbraco.Web.Common/UmbracoHelper.cs b/src/Umbraco.Web.Common/UmbracoHelper.cs index 56181b29da..17729f3364 100644 --- a/src/Umbraco.Web.Common/UmbracoHelper.cs +++ b/src/Umbraco.Web.Common/UmbracoHelper.cs @@ -174,6 +174,7 @@ public class UmbracoHelper private IPublishedContent? ContentForObject(object id) => _publishedContentQuery.Content(id); + [Obsolete("The current implementation of XPath is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IPublishedContent? ContentSingleAtXPath(string xpath, params XPathVariable[] vars) => _publishedContentQuery.ContentSingleAtXPath(xpath, vars); @@ -286,9 +287,11 @@ public class UmbracoHelper /// If an identifier does not match an existing content, it will be missing in the returned value. public IEnumerable Content(IEnumerable ids) => _publishedContentQuery.Content(ids); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IEnumerable ContentAtXPath(string xpath, params XPathVariable[] vars) => _publishedContentQuery.ContentAtXPath(xpath, vars); + [Obsolete("The current implementation of this method is suboptimal and will be removed entirely in a future version. Scheduled for removal in v14")] public IEnumerable ContentAtXPath(XPathExpression xpath, params XPathVariable[] vars) => _publishedContentQuery.ContentAtXPath(xpath, vars);