【发布时间】:2012-07-05 02:46:34
【问题描述】:
我正在研究 Sitecore 的社交连接模块,并试图将社交更新与营销目标联系起来。 Sitecore 的documentation 声明:
在营销中心的发布标签上,点击更新。 更新标签出现。
当我点击 更新 时,我收到一个警告窗口,指出:“您无权查看任何项目报告。”我在以开发人员或管理员身份登录时都会收到此警报,因此它似乎与安全无关。
我正在运行带有 Social Connected Module 1.1.0 rev. 的 Sitecore.NET 6.5.0(rev. 120427)。 120329.
更新:
- 更新按钮映射到核心数据库项目 /sitecore/content/Applications/Content Editor/Ribbons/Chunks/Social/Updates 中的命令“social:tab:show”。
- “social:tab:show”链接到 Sitecore.Social.config 中的“Sitecore.Social.Publishing.Commands.SocialCenter”。
- 这是发送警报的代码:
public override void Execute(CommandContext context)
{
Assert.ArgumentNotNull((object) context, "context");
if (context.Items.Length != 1)
return;
if (WebUtil.GetFormValue("scEditorTabs").Contains("social:tab:show"))
{
SheerResponse.Eval("scContent.onEditorTabClick(null, null, 'OpenSocialCenter')");
}
else
{
Item obj = Context.Item;
if (obj == null)
{
SheerResponse.Alert("You do not have permission to see any item reports.", new string[0]);
}
else
[code continues]
- 我将 Sitecore.Social.Publishing.Commands.SocialCenter 子类化,以便设置断点。以下是我在执行期间看到的值:
- Sitecore.Context.Item 为空。
- context.Items 有一个项目,即在营销中心中打开的目标项目。
-
WebUtil.GetFormValue("scEditorTabs")返回一个空字符串。该代码似乎需要“social:tab:show”。
- 使用 Sitecore 6.5 build 3 无法解决问题。
- 更新按钮确实适用于常规内容项(而不是目标)。但是,文档明确指出,要在“营销中心”选项卡上单击此按钮。
【问题讨论】:
标签: sitecore sitecore6 social sitecore-social-connected