2014-10-07 18 views
0

我只有一个成员类型有很多属性,我从Umbraco 6.2.1升级到7.1.6。无法检索空成员项目类型的数据

当我点击右键,去创造的“经销商登录用户”的新成员,我收到此错误:当我去点击任何现有成员的我收到此错误

Server error: Contact administrator, see log for full details. 
Failed to retrieve data for empty member item type DealerLoginUser 

Server error: Contact administrator, see log for full details. 
Failed to retrieve data for member id ac15863825084e1cb1e9e620b3a1a872 

我挖成在Azure上的日志,它给了我一个500错误,这是我发现:

Buffer=")]}', 
{"Message":"An error has occurred.","ExceptionMessage":"The given key was not present in the dictionary.","ExceptionType":"System.Collections.Generic.KeyNotFoundException","StackTrace":" at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n at Umbraco.Web.PropertyEditors.MultiNodeTreePickerPropertyEditor.MultiNodePickerPreValueEditor.ConvertDbToEditor(IDictionary`2 defaultPreVals, PreValueCollection persistedPreVals)\r\n at Umbraco.Web.Models.Mapping.ContentPropertyDisplayConverter.ConvertCore(Property originalProp)\r\n at AutoMapper.TypeConverter`2.Convert(ResolutionContext context)\r\n at AutoMapper.MappingExpression`2.<>c__DisplayClass15.<ConvertUsing>b__14(ResolutionContext context)\r\n at AutoMapper.Mappers.TypeMapObjectMapperRegistry.CustomMapperStrategy.Map(ResolutionContext context, IMappingEngineRunner mapper)\r\n at AutoMapper.Mappers.TypeMapMapper.Map(ResolutionContext context, IMappingEngineRunner mapper)\r\n at AutoMapper.MappingEngine.AutoMapper.IMappingEngineRunner.Map(ResolutionContext context)"}" 

我看到它与“MultiNodeTreePicker”,这也是在这里引用的错误:http://our.umbraco.org/forum/getting-started/installing-umbraco/54018-Upgrading-621-to-714-Failed-to-retrieve-data-for-data-type-error-for-MNTP

该职位有,我可以运行SQL脚本:

-- This script should be run after Umbraco install script 

USE DatabaseName-- specify database 
GO 

DECLARE @datatypeIds TABLE (id int); 

INSERT INTO @datatypeIds 
SELECT nodeId 
FROM cmsDataType 
WHERE propertyEditorAlias = 'Umbraco.MultiNodeTreePicker' 

DELETE FROM cmsDataTypePreValues 
WHERE datatypeNodeId IN (SELECT id FROM @datatypeIds); 

INSERT INTO cmsDataTypePreValues 
SELECT 
    [@datatypeIds].id, 
    1, 
    1, 
    'maxNumber' 
FROM 
@datatypeIds; 

SELECT  * 
FROM  cmsDataTypePreValues 
WHERE  datatypeNodeId IN (SELECT id FROM @datatypeIds) 
GO 

但我不知道这是否会解决我的问题? 我也不知道是什么的海报有指

Be aware that this will remove all prevalues for specified datatypes. Application pool recycle will be needed afterwards.

+0

此评论是不是会帮助你..但是,我与Umbraco多年来学到的一件事:永远不要升级你的实例!如果我是你,我会回滚到v6并对该版本感到满意。 – 2014-10-07 19:33:14

+0

不幸的是,建立在6之上的是长期可维护性和速度的反生产力。如果您对如何解决问题有任何想法,请尽管权衡! – cvocvo 2014-10-07 21:04:23

回答

0

更新 - 所以我试图运行在该链接,将解决多节点treepicker指定的SQL脚本。然而,它并没有为我工作,似乎放弃我的成员...这是不好的。幸运的是,备份存在,我有一个备份版本交换到位。

我将问题追溯到使用多节点treepicker的几个数据类型,但未正确加载(这些被指定为成员类型的通用属性)。

更新2(解决方案):这是通过将成员类型中的属性从已破坏的数据类型(我已删除)更改为标签/文本字符串来解决的。此外,SQL并没有删除我的成员,删除我的成员类型,然后重新创建它以追踪该问题,并删除了该类型的所有成员。