Possible fix for U4-1466 which surfaced with the Standard MVC Starterkit package.

This commit is contained in:
Morten Christensen
2013-01-28 15:37:18 -01:00
parent 0dbebaf12e
commit bc99a6f6c0
2 changed files with 7 additions and 1 deletions

View File

@@ -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
{

View File

@@ -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);