From bc99a6f6c007b283bd9cd4350d29c5be430f81bd Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Mon, 28 Jan 2013 15:37:18 -0100 Subject: [PATCH] Possible fix for U4-1466 which surfaced with the Standard MVC Starterkit package. --- src/umbraco.cms/businesslogic/Content.cs | 2 +- src/umbraco.cms/businesslogic/web/Document.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/umbraco.cms/businesslogic/Content.cs b/src/umbraco.cms/businesslogic/Content.cs index 9ec92fcdf8..012b2759ef 100644 --- a/src/umbraco.cms/businesslogic/Content.cs +++ b/src/umbraco.cms/businesslogic/Content.cs @@ -157,7 +157,7 @@ namespace umbraco.cms.businesslogic { if (_contentTypeIcon == null && this.ContentType != null) _contentTypeIcon = this.ContentType.IconUrl; - return _contentTypeIcon; + return _contentTypeIcon ?? string.Empty; } set { diff --git a/src/umbraco.cms/businesslogic/web/Document.cs b/src/umbraco.cms/businesslogic/web/Document.cs index 92f9defa4e..47f6c43fc4 100644 --- a/src/umbraco.cms/businesslogic/web/Document.cs +++ b/src/umbraco.cms/businesslogic/web/Document.cs @@ -1353,6 +1353,12 @@ namespace umbraco.cms.businesslogic.web [Obsolete("Obsolete", false)] protected override void setupNode() { + if (Id == -1 || Id == -20) + { + base.setupNode(); + return; + } + var content = Version == Guid.Empty ? ApplicationContext.Current.Services.ContentService.GetById(Id) : ApplicationContext.Current.Services.ContentService.GetByVersion(Version);