diff --git a/umbraco/presentation/requestModule.cs b/umbraco/presentation/requestModule.cs index 435e502699..f5c0985e81 100644 --- a/umbraco/presentation/requestModule.cs +++ b/umbraco/presentation/requestModule.cs @@ -175,7 +175,7 @@ namespace umbraco.presentation receivedQuery.Length - ampPos - 1); } // get umbPage out of query string (9 = "&umbPage".Length() + 1) - path = receivedQuery.Substring(9, ampPos - 9); + path = receivedQuery.Substring(9, ampPos - 9); //this will fail if there are < 9 characters before the &umbPage query string } else { diff --git a/umbraco/presentation/umbraco/dialogs/ExportCode.aspx.cs b/umbraco/presentation/umbraco/dialogs/ExportCode.aspx.cs index 7b571627d0..0e07154741 100644 --- a/umbraco/presentation/umbraco/dialogs/ExportCode.aspx.cs +++ b/umbraco/presentation/umbraco/dialogs/ExportCode.aspx.cs @@ -249,7 +249,7 @@ namespace {0} {{ if (dt.MasterContentType > 0) { var parent = DocTypes.First(d => d.Id == dt.MasterContentType); - baseType = GenerateTypeName(dt.Alias); + baseType = GenerateTypeName(parent.Alias); } sb.AppendLine(string.Format(INTERFACE_TEMPLATE, @@ -318,7 +318,7 @@ namespace {0} {{ if (dt.MasterContentType > 0) { var parent = DocTypes.First(d => d.Id == dt.MasterContentType); - baseType = GenerateTypeName(dt.Alias); + baseType = GenerateTypeName(parent.Alias); } sb.Append(string.Format(CLASS_TEMPLATE, @@ -476,6 +476,10 @@ namespace {0} {{ private static string FormatForComment(string s) { + if (string.IsNullOrEmpty(s)) + { + return s; + } return s.Replace("\r\n", "\r\n///"); } }