diff --git a/umbraco/cms/businesslogic/ContentType.cs b/umbraco/cms/businesslogic/ContentType.cs index 35e38dee53..a5d98c12c3 100644 --- a/umbraco/cms/businesslogic/ContentType.cs +++ b/umbraco/cms/businesslogic/ContentType.cs @@ -142,17 +142,30 @@ namespace umbraco.cms.businesslogic //by-passes a lot of queries just to determine if this is a true/false data type string sql = "select " + - "cmsDataType.controlId " + + "cmsDataType.controlId, masterContentType.alias as masterAlias " + "from " + - " cmsContentType " + + "cmsContentType " + "inner join cmsPropertyType on (cmsContentType.nodeId = cmsPropertyType.contentTypeId) " + - "inner join cmsDataType on (cmsPropertyType.dataTypeId = cmsDataType.nodeId) " + - " where cmsContentType.alias = @contentTypeAlias and cmsPropertyType.Alias = @propertyAlias"; - //grab the controlid - Guid controlId = Application.SqlHelper.ExecuteScalar(sql, + "left join cmsDataType on (cmsPropertyType.dataTypeId = cmsDataType.nodeId) and cmsPropertyType.Alias = @propertyAlias " + + "left join cmsContentType masterContentType on masterContentType.nodeid = cmsContentType.masterContentType " + + "where cmsContentType.alias = @contentTypeAlias"; + //grab the controlid or test for parent + Guid controlId = Guid.Empty; + var reader = Application.SqlHelper.ExecuteReader(sql, Application.SqlHelper.CreateParameter("@contentTypeAlias", contentTypeAlias), Application.SqlHelper.CreateParameter("@propertyAlias", propertyTypeAlias) ); + if (reader.Read()) + { + if (!reader.IsNull("controlId")) + controlId = reader.GetGuid("controlId"); + else if (!reader.IsNull("masterAlias") && !String.IsNullOrEmpty(reader.GetString("masterAlias"))) + { + controlId = GetDataType(reader.GetString("masterAlias"), propertyTypeAlias); + } + } + reader.Close(); + //add to cache _propertyTypeCache.Add(key, controlId); diff --git a/umbraco/presentation/web.config b/umbraco/presentation/web.config index 02e3863a6a..3187040e14 100644 --- a/umbraco/presentation/web.config +++ b/umbraco/presentation/web.config @@ -39,8 +39,8 @@ - - + + diff --git a/umbraco/presentation/web.config.UMBRACOHUMMER.xslt b/umbraco/presentation/web.config.UMBRACOHUMMER.xslt index 2b9a9abf66..7532732529 100644 --- a/umbraco/presentation/web.config.UMBRACOHUMMER.xslt +++ b/umbraco/presentation/web.config.UMBRACOHUMMER.xslt @@ -4,11 +4,11 @@ - server=.\sqlexpress;database=v452;integrated security=false;user id=DBUSER;password=DBPASSWORD + server=.\sqlexpress;database=v47;integrated security=false;user id=DBUSER;password=DBPASSWORD - 4.5.2.beta + 4.7.0.RC