Fixes U4-1393 so Tabs shows as expected on both Content- and MediaTypes.
Corrected malformed query for PropertyGroups.
This commit is contained in:
@@ -28,7 +28,9 @@ namespace Umbraco.Core.Persistence.Factories
|
||||
group.SortOrder = groupDto.SortOrder;
|
||||
group.PropertyTypes = new PropertyTypeCollection();
|
||||
|
||||
foreach (var typeDto in groupDto.PropertyTypeDtos)
|
||||
//Because we are likely to have a group with no PropertyTypes we need to ensure that these are excluded
|
||||
var typeDtos = groupDto.PropertyTypeDtos.Where(x => x.Id > 0);
|
||||
foreach (var typeDto in typeDtos)
|
||||
{
|
||||
group.PropertyTypes.Add(new PropertyType(typeDto.DataTypeDto.ControlId,
|
||||
typeDto.DataTypeDto.DbType.EnumParse<DataTypeDatabaseType>(true))
|
||||
@@ -53,7 +55,7 @@ namespace Umbraco.Core.Persistence.Factories
|
||||
|
||||
public IEnumerable<PropertyTypeGroupDto> BuildDto(IEnumerable<PropertyGroup> entity)
|
||||
{
|
||||
return entity.Select(propertyGroup => BuildGroupDto(propertyGroup)).ToList();
|
||||
return entity.Select(BuildGroupDto).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -235,12 +235,12 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
var sql = new Sql();
|
||||
sql.Select("*")
|
||||
.From<PropertyTypeGroupDto>()
|
||||
.RightJoin<PropertyTypeDto>()
|
||||
.LeftJoin<PropertyTypeDto>()
|
||||
.On<PropertyTypeGroupDto, PropertyTypeDto>(left => left.Id, right => right.PropertyTypeGroupId)
|
||||
.InnerJoin<DataTypeDto>()
|
||||
.LeftJoin<DataTypeDto>()
|
||||
.On<PropertyTypeDto, DataTypeDto>(left => left.DataTypeId, right => right.DataTypeId)
|
||||
.Where<PropertyTypeDto>(x => x.ContentTypeId == id)
|
||||
.OrderBy<PropertyTypeDto>(x => x.PropertyTypeGroupId);
|
||||
.Where<PropertyTypeGroupDto>(x => x.ContentTypeNodeId == id)
|
||||
.OrderBy<PropertyTypeGroupDto>(x => x.Id);
|
||||
|
||||
var dtos = Database.Fetch<PropertyTypeGroupDto, PropertyTypeDto, DataTypeDto, PropertyTypeGroupDto>(new GroupPropertyTypeRelator().Map, sql);
|
||||
|
||||
|
||||
@@ -2072,7 +2072,9 @@
|
||||
</Content>
|
||||
<Content Include="umbraco.presentation\umbraco\settings\EditDictionaryItem.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\settings\editLanguage.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\settings\EditMediaType.aspx" />
|
||||
<Content Include="umbraco.presentation\umbraco\settings\EditMediaType.aspx">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Content>
|
||||
<Content Include="umbraco.presentation\umbraco\settings\EditNodeTypeNew.aspx">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Content>
|
||||
|
||||
@@ -341,7 +341,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
|
||||
}
|
||||
private void bindDataGenericProperties(bool Refresh)
|
||||
{
|
||||
var tabs = cType.getVirtualTabs.DistinctBy(x => x.ContentType).ToArray();
|
||||
var tabs = cType.getVirtualTabs;
|
||||
var dtds = cms.businesslogic.datatype.DataTypeDefinition.GetAll();
|
||||
|
||||
PropertyTypes.Controls.Clear();
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Caching;
|
||||
using umbraco.cms.businesslogic.cache;
|
||||
using umbraco.cms.businesslogic.propertytype;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
@@ -1128,6 +1129,9 @@ namespace umbraco.cms.businesslogic
|
||||
/// <param name="Id">The id.</param>
|
||||
public static void FlushFromCache(int id)
|
||||
{
|
||||
//Ensure that MediaTypes are reloaded from db by clearing cache
|
||||
InMemoryCacheProvider.Current.Clear();
|
||||
|
||||
ContentType ct = new ContentType(id);
|
||||
Cache.ClearCacheItem(string.Format("UmbracoContentType{0}", id));
|
||||
Cache.ClearCacheItem(ct.GetPropertiesCacheKey());
|
||||
|
||||
Reference in New Issue
Block a user