diff --git a/config templates/config/ClientDependency.config b/config templates/config/ClientDependency.config index ed4c3ee102..f23d1bc548 100644 --- a/config templates/config/ClientDependency.config +++ b/config templates/config/ClientDependency.config @@ -10,7 +10,7 @@ NOTES: * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * A new version will invalidate both client and server cache and create new persisted files --> - + diff --git a/umbraco/cms/businesslogic/member/MemberType.cs b/umbraco/cms/businesslogic/member/MemberType.cs index c022a5241a..523acd11ae 100644 --- a/umbraco/cms/businesslogic/member/MemberType.cs +++ b/umbraco/cms/businesslogic/member/MemberType.cs @@ -95,11 +95,21 @@ namespace umbraco.cms.businesslogic.member /// /// The alias of the MemberType /// The MemberType with the given Alias - public static new MemberType GetByAlias(string Alias) - { - return new MemberType(SqlHelper.ExecuteScalar("SELECT nodeid from cmsContentType where alias = @alias", - SqlHelper.CreateParameter("@alias", Alias))); - } + public new static MemberType GetByAlias(string Alias) + { + try + { + return + new MemberType( + SqlHelper.ExecuteScalar(@"SELECT nodeid from cmsContentType INNER JOIN umbracoNode on cmsContentType.nodeId = umbracoNode.id WHERE nodeObjectType=@nodeObjectType AND alias=@alias", + SqlHelper.CreateParameter("@nodeObjectType", MemberType._objectType), + SqlHelper.CreateParameter("@alias", Alias))); + } + catch + { + return null; + } + } /// diff --git a/umbraco/cms/businesslogic/web/DocumentType.cs b/umbraco/cms/businesslogic/web/DocumentType.cs index c37eabaa6f..5065f6b496 100644 --- a/umbraco/cms/businesslogic/web/DocumentType.cs +++ b/umbraco/cms/businesslogic/web/DocumentType.cs @@ -120,8 +120,9 @@ namespace umbraco.cms.businesslogic.web { return new DocumentType( - SqlHelper.ExecuteScalar("SELECT nodeid from cmsContentType where alias = @alias", - SqlHelper.CreateParameter("@alias", Alias))); + SqlHelper.ExecuteScalar(@"SELECT nodeid from cmsContentType INNER JOIN umbracoNode on cmsContentType.nodeId = umbracoNode.id WHERE nodeObjectType=@nodeObjectType AND alias=@alias", + SqlHelper.CreateParameter("@nodeObjectType", DocumentType._objectType), + SqlHelper.CreateParameter("@alias", Alias))); } catch { diff --git a/umbraco/presentation/config/ClientDependency.config b/umbraco/presentation/config/ClientDependency.config index 78a1e9eaf2..712045b601 100644 --- a/umbraco/presentation/config/ClientDependency.config +++ b/umbraco/presentation/config/ClientDependency.config @@ -10,7 +10,7 @@ NOTES: * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * A new version will invalidate both client and server cache and create new persisted files --> - +