Sitecore 6.6 项目桶模块:非活动桶按钮

Sitecore 6.6 Item Buckets Module: Inactive Bucket Button

我有带 SIP 3.2 的 Sitecore 6.6 运行 并且想使用 Item Buckets(在这种情况下更新到 Sitecore 7 对我们不起作用)。所以我安装了 (the Module) 并获得了要在 Sitecore 中显示的新菜单图标。问题是,当我 select 内容树中的项目时,Bucket 按钮(将项目转换为存储桶)始终处于非活动状态。请参阅以下屏幕截图:

Google 搜索没有帮助。知道哪里出了问题吗?

编辑:

访问查看器:

安全编辑:

有 3 种情况会禁用此按钮:

  1. 这个项目已经是一个桶
  2. 项目锁定
  3. 用户没有对所选项目的 bucket:makebucket 的访问权限。

从你写的内容和你的屏幕截图来看,我认为你的情况是第二种或第三种情况。检查项目是否被锁定并尝试使用 Access 查看器Security Editor 以获得 check/assign 适当的访问权限。


编辑:

您可以随时调试此命令,看看它被禁用的原因是什么。

在您的项目中创建一个名为 MakeBucket 的 class(将 My.Assembly.Namespace 更改为您的项目命名空间):

namespace My.Assembly.Namespace
{
    using System.Collections.Specialized;
    using Sitecore.Diagnostics;
    using Sitecore.ItemBucket.Kernel.ItemExtensions.Axes;
    using Sitecore.ItemBucket.Kernel.Kernel.Pipelines;
    using Sitecore.ItemBucket.Kernel.Security;
    using Sitecore.Shell.Framework.Commands;

    internal class MakeBucket : Command
    {
        public override void Execute(CommandContext context)
        {
            Assert.ArgumentNotNull(context, "context");
            var items = context.Items;
            Assert.IsNotNull(items, "Context items list is null");
            Context.ClientPage.Start("uiBucketItems", new BucketArgs(items[0], new NameValueCollection()));
        }

        public override CommandState QueryState(CommandContext context)
        {
            Error.AssertObject(context, "context");

            var item = context.Items[0];
            if (!new BucketSecurityManager(item).IsAllowedToCreateBucket)
            {
                return CommandState.Disabled;
            }

            if (!item.Locking.HasLock())
            {
                return CommandState.Disabled;
            }

            return item.IsBucketItemCheck() ? CommandState.Disabled : CommandState.Enabled;
        }
   }
}

并在 App_Config/Include/Sitecore.ItemBuckets.config 中注册它,而不是原来的 item:bucket 命令:

<command name="item:bucket" type="My.Assembly.Namespace.MakeBucket,My.Assembly" />

附加调试器并在 QueryState 方法中放置一个断点。

原来你想变成桶的项目必须被锁定(点击主页 -> 编辑)。然后 Bucket 按钮处于活动状态。无论如何感谢您的帮助!