【问题标题】:Sitecore 8.2 showing error attempt to access method 'Sitecore.Context+PageMode.get_IsPageEditor()' failedSitecore 8.2 显示错误尝试访问方法“Sitecore.Context+PageMode.get_IsPageEditor()”失败
【发布时间】:2016-12-22 05:46:56
【问题描述】:
我已从 Sitecore 8.1 升级到 Sitecore 8.2。我有一个我正在使用的方法:
Sitecore.Context.PageMode.IsPageEditor
为此它给出错误:
attempt by method METHOD_NAME to access method 'Sitecore.Context+PageMode.get_IsPageEditor()' failed.
我错过了什么?
【问题讨论】:
标签:
sitecore
sitecore8.1
sitecore8.2
【解决方案1】:
Sitecore.Context.PageMode.IsPageEditor
自 Sitecore 8.0 Update-6 起已在 Sitecore.Kernel 中弃用,请参阅release notes:
已弃用和删除的功能
属性 IsPageEditor、IsPageEditorDesigning 和
来自 Sitecore 的 Context.PageMode 类中的 IsPageEditorEditing
命名空间已被弃用,取而代之的是新引入的
属性 IsExperienceEditor 和 IsExperienceEditorEditing。老的
属性将在未来的主要版本之一中删除。
(438475)
在 Sitecore 8.2 更新 1 中,移除了 Sitecore.Context.PageMode.IsPageEditor
使用
Sitecore.Context.PageMode.IsExperienceEditor
同样适用于:
IsPageEditor, Obsolete Use IsExperienceEditor instead
IsPageEditorClassic, Deprecated always false
IsPageEditorDesigning, Obsolete Use IsExperienceEditorEditing instead
IsPageEditorEditing, Obsolete Use IsExperienceEditorEditing instead
IsPageEditorNavigating, Deprecated always false