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:
Morten Christensen
2013-01-09 09:57:01 -01:00
parent b7ff6ae375
commit ad2a82cc65
4 changed files with 10 additions and 5 deletions

View File

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

View File

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

View File

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

View File

@@ -1612,7 +1612,7 @@ namespace umbraco.cms.businesslogic.web
{
if (AfterSave != null)
{
AfterSave(this, e);
AfterSave(new Document(this.Id), e);
}
}