Edit: I was too quick, and now see that you use .ContentSingleAtXPath(string xpath) in your code. Maybe there are some alternative for dynamic roots?
Anyway, XPath is only obsolete in version 13, so I think this can be considered as a bug in Umbraco.
We got this same error, but from inside Umbraco backoffice. It appeared in the UX when opening a node/document containing a Multinode Treepicker with an XPath query. As far as I can see, Umbraco 13 don't handle the "old"/depricated XPath Queries (string).
The solution for us was to convert the XPath queries to Dynamic Root Queries, as shown in the screenshot.
XPathValue must be an XPathNavigator or a string
Hi guys
I got this error when upgrade to umbraco 13 LTS
XPathValue must be an XPathNavigator or a string
Any help. Thank you!
Hi Marcus
Edit: I was too quick, and now see that you use .ContentSingleAtXPath(string xpath) in your code. Maybe there are some alternative for dynamic roots? Anyway, XPath is only obsolete in version 13, so I think this can be considered as a bug in Umbraco.
We got this same error, but from inside Umbraco backoffice. It appeared in the UX when opening a node/document containing a Multinode Treepicker with an XPath query. As far as I can see, Umbraco 13 don't handle the "old"/depricated XPath Queries (string). The solution for us was to convert the XPath queries to Dynamic Root Queries, as shown in the screenshot.
More about this in the Umbraco documentation.
And I guess this may be the case for the document you're trying to render or process as well.
-Vidar
Did you get to the bottom of this error? I've just had it on an upgrade from 10.8.3 -> 13.1
For me it was the // in the XPATH, if I made it / path it worked
https://github.com/umbraco/Umbraco-CMS/issues/15647
but going to convert to Dynamic Root anyway, as V14, XPATH goes completely.
For now i've solved it with this solution:
.ContentAtRoot().SingleOrDefault(x => x.Name == "Name of content");
This seems wrong as it will first pull ALL content at the root level and then single out the one content node you want.
Maybe someone knows the proper replacement for the old xpath version.
Seems weird that the developers will just remove xpath without giving any alternative solutions!
is working on a reply...