You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we have a setup with three separate sites, each with its own error page, I have used this format.
On my LOCAL environment, this works correctly - visiting a non-existent url returns the proper error page. But on my Cloud environments (DEV/LIVE) it doesn't work - I see the ugly white Umbraco 404 page. If I check the log on DEV, I see this message:
Message:
Could not parse xpath expression: "$site//ErrorPage[@nodeName='404']"
Exception:
System.Xml.XPath.XPathException: Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
at MS.Internal.Xml.XPath.CompiledXpathExpr.get_QueryTree()
at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator context)
at System.Xml.XPath.XPathNavigator.Select(XPathExpression expr)
at Umbraco.Web.PublishedCache.NuCache.ContentCache.GetSingleByXPath(Boolean preview, String xpath, XPathVariable[] vars)
at Umbraco.Web.PublishedContentQuery.ContentSingleAtXPath(String xpath, XPathVariable[] vars)
at Umbraco.Web.Routing.NotFoundHandlerHelper.GetContentIdFromErrorPageConfig(IContentErrorPage errorPage, IEntityService entityService, IPublishedContentQuery publishedContentQuery, Nullable`1 domainContentId)
Issue description
According to this PR - umbraco/Umbraco-CMS#10356, as of Umbraco v 8.16, the following 404 configuration should now work:
umbracoSettings.config:
<error404>$site//MyErrorPageType[@nodeName='404']</error404>
Since we have a setup with three separate sites, each with its own error page, I have used this format.
On my LOCAL environment, this works correctly - visiting a non-existent url returns the proper error page. But on my Cloud environments (DEV/LIVE) it doesn't work - I see the ugly white Umbraco 404 page. If I check the log on DEV, I see this message:
Ps. The v8 docs have not yet been updated accordingly, so I wanted to check that this is indeed officially supported
https://our.umbraco.com/Documentation/Tutorials/Custom-Error-Pages/index-v8
Version
Umbraco Cloud
Umbraco Id
Umbraco 8.17.0
Deploy 4.3.0.0
Forms 8.8.0
The text was updated successfully, but these errors were encountered: