diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 8012081a1c..36556945db 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -147,7 +147,8 @@ Page Title Properties This document is published but is not visible because the parent '%0%' is unpublished - Oops: this document is published but is not in the cache (internal error) + Oops: this document is published but is not in the cache (internal error - see log) + Oops: could not get the url (internal error - see log) Oops: this document is published but its url would collide with content %0% Publish Publication Status @@ -789,7 +790,7 @@ To manage your website, simply open the Umbraco back office and start adding con Installing... Restarting, please wait... All done, your browser will now refresh, please wait... - + Paste with full formatting (Not recommended) @@ -1294,38 +1295,38 @@ To manage your website, simply open the Umbraco back office and start adding con Value is set to the recommended value: '%0%'. Value was set to '%1%' for XPath '%2%' in configuration file '%3%'. Expected value '%1%' for '%2%' in configuration file '%3%', but found '%0%'. - Found unexpected value '%0%' for '%2%' in configuration file '%3%'. - + Found unexpected value '%0%' for '%2%' in configuration file '%3%'. + + --> Custom errors are set to '%0%'. Custom errors are currently set to '%0%'. It is recommended to set this to '%1%' before go live. Custom errors successfully set to '%0%'. - + MacroErrors are set to '%0%'. MacroErrors are set to '%0%' which will prevent some or all pages in your site from loading completely when there's any errors in macros. Rectifying this will set the value to '%1%'. MacroErrors are now set to '%0%'. - + + --> Try Skip IIS Custom Errors is set to '%0%' and you're using IIS version '%1%'. Try Skip IIS Custom Errors is currently '%0%'. It is recommended to set this to '%1%' for your IIS version (%2%). Try Skip IIS Custom Errors successfully set to '%0%'. - + File does not exist: '%0%'. '%0%' in config file '%1%'.]]> There was an error, check log for full error: %0%. - + Total XML: %0%, Total: %1% Total XML: %0%, Total: %1% Total XML: %0%, Total published: %1% - + Certificate validation error: '%0%' Error pinging the URL %0% - '%1%' You are currently %0% viewing the site using the HTTPS scheme. @@ -1337,12 +1338,12 @@ To manage your website, simply open the Umbraco back office and start adding con Enable HTTPS Sets umbracoSSL setting to true in the appSettings of the web.config file. The appSetting 'umbracoUseSSL' is now set to 'true' in your web.config file, your cookies will be marked as secure. - + Fix Cannot fix a check with a value comparison type of 'ShouldNotEqual'. Cannot fix a check with a value comparison type of 'ShouldEqual' with a provided value. Value to fix check not provided. - + Debug compilation mode is disabled. Debug compilation mode is currently enabled. It is recommended to disable this setting before go live. Debug compilation mode successfully disabled. @@ -1364,7 +1365,7 @@ To manage your website, simply open the Umbraco back office and start adding con --> %0%.]]> %0%. If they aren't being written to no action need be taken.]]> - + X-Frame-Options used to control whether a site can be IFRAMed by another was found.]]> X-Frame-Options used to control whether a site can be IFRAMed by another was not found.]]> Set Header in Config @@ -1385,5 +1386,5 @@ To manage your website, simply open the Umbraco back office and start adding con %0%.]]> %0%.]]> - + diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index 8416efa423..5c378bd835 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -148,7 +148,8 @@ Page Title Properties This document is published but is not visible because the parent '%0%' is unpublished - Oops: this document is published but is not in the cache (internal error) + Oops: this document is published but is not in the cache (internal error - see log) + Oops: could not get the url (internal error - see log) Oops: this document is published but its url would collide with content %0% Publish Publication Status diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs index f2ef0e348f..884138a9b4 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs @@ -409,7 +409,10 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache internal XmlDocument GetXml(UmbracoContext umbracoContext, bool preview) { - return GetXmlDelegate(umbracoContext, preview); + var xml = GetXmlDelegate(umbracoContext, preview); + if (xml == null) + throw new Exception("The Xml cache is corrupt. Use the Health Check data integrity dashboard to fix it."); + return xml; } #endregion diff --git a/src/Umbraco.Web/Redirects/RedirectTrackingEventHandler.cs b/src/Umbraco.Web/Redirects/RedirectTrackingEventHandler.cs index 6ba60b3891..42c5e6093b 100644 --- a/src/Umbraco.Web/Redirects/RedirectTrackingEventHandler.cs +++ b/src/Umbraco.Web/Redirects/RedirectTrackingEventHandler.cs @@ -8,7 +8,6 @@ using Umbraco.Web.Routing; using System.Collections.Generic; using System.Linq; using Umbraco.Core.Cache; -using Umbraco.Core.Logging; using Umbraco.Core.Models.PublishedContent; using Umbraco.Web.Cache; diff --git a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs index 0a20f51da7..c6e08c16c5 100644 --- a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Umbraco.Core.Models; using umbraco; +using Umbraco.Core.Logging; namespace Umbraco.Web.Routing { @@ -30,8 +31,17 @@ namespace Umbraco.Web.Routing return urls; } + string url; var urlProvider = umbracoContext.RoutingContext.UrlProvider; - var url = urlProvider.GetUrl(content.Id); + try + { + url = urlProvider.GetUrl(content.Id); + } + catch (Exception e) + { + LogHelper.Error("GetUrl exception.", e); + url = "#ex"; + } if (url == "#") { // document as a published version yet it's url is "#" => a parent must be @@ -48,6 +58,10 @@ namespace Umbraco.Web.Routing else urls.Add(ui.Text("content", "parentNotPublished", parent.Name, umbracoContext.Security.CurrentUser)); } + else if (url == "#ex") + { + urls.Add(ui.Text("content", "getUrlException", umbracoContext.Security.CurrentUser)); + } else if (url.StartsWith("#err-")) { // route error, report