Possible fix for U4-1407 and related to the install problems for uBlogsy.
Ensures that PropertyGroups are sorted so they are properly mapped.
This commit is contained in:
@@ -238,7 +238,8 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
.On<PropertyTypeGroupDto, PropertyTypeDto>(left => left.Id, right => right.PropertyTypeGroupId)
|
||||
.InnerJoin<DataTypeDto>()
|
||||
.On<PropertyTypeDto, DataTypeDto>(left => left.DataTypeId, right => right.DataTypeId)
|
||||
.Where<PropertyTypeDto>(x => x.ContentTypeId == id);
|
||||
.Where<PropertyTypeDto>(x => x.ContentTypeId == id)
|
||||
.OrderBy<PropertyTypeDto>(x => x.PropertyTypeGroupId);
|
||||
|
||||
var dtos = Database.Fetch<PropertyTypeGroupDto, PropertyTypeDto, DataTypeDto, PropertyTypeGroupDto>(new GroupPropertyTypeRelator().Map, sql);
|
||||
|
||||
|
||||
@@ -677,9 +677,13 @@ namespace umbraco.cms.businesslogic
|
||||
continue;
|
||||
|
||||
//get the propertyId
|
||||
var property = propData.LastOrDefault(x => x.PropertyTypeId == pt.Id);
|
||||
var property = propData.SingleOrDefault(x => x.PropertyTypeId == pt.Id);
|
||||
if (property == null)
|
||||
continue;
|
||||
{
|
||||
//continue;
|
||||
var prop = Property.MakeNew(pt, this, Version);
|
||||
property = new {Id = prop.Id, PropertyTypeId = pt.Id};
|
||||
}
|
||||
var propertyId = property.Id;
|
||||
|
||||
Property p = null;
|
||||
|
||||
@@ -425,7 +425,7 @@ namespace umbraco.cms.businesslogic.packager
|
||||
for (int i = 0; i < allowed.Count; i++)
|
||||
adt[i] = (int)allowed[i];
|
||||
dt.AllowedChildContentTypeIDs = adt;
|
||||
|
||||
dt.Save();
|
||||
//PPH we log the document type install here.
|
||||
insPack.Data.Documenttypes.Add(dt.Id.ToString());
|
||||
saveNeeded = true;
|
||||
|
||||
@@ -1612,7 +1612,7 @@ namespace umbraco.cms.businesslogic.web
|
||||
{
|
||||
if (AfterSave != null)
|
||||
{
|
||||
AfterSave(this, e);
|
||||
AfterSave(new Document(this.Id), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user