本文介绍了无法激活有关克隆敏捷类型(文件夹)的讨论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究基于灵活性的plone应用程序.我创建了一些新类型.这是我为激活名为"activity_report"的特定灵活性内容类型的注释所做的:

I have been working on a dexterity based plone application.I have created a couple of new types. This is what I did to activate comments on a specific dexterity content type named "activity_report":

在克隆控制面板"中

讨论部分中,我启用了以下功能:

In the Discussion section I enabled the following:

  • 全局启用评论
  • 启用匿名评论

类型部分我从下拉菜单中选择了活动报告"类型,并启用了允许评论"选项.

In the Types Section I chose the "Activity Report" type from the drop down and enabled the "Allow comments" option.

在文件系统上

在FTI文件activityreport.xml中:

In the FTI file activityreport.xml:

<property name="allow_discussion">True</property>

我已经重新启动实例,甚至重新安装了产品,但是我无法激活敏捷类型中的注释部分.

I have restarted the instance and even reinstalled the product, but I can not activate the comments section in the dexterity type.

值得一提的是,标准类型(例如Page)可以激活讨论模块.

It is worth mentioning that a standard type (ex. Page) can have the discussion module activated.

有什么我想念的吗?

推荐答案

plone.app.discussion当前禁用所有容器的注释(请参见 https://dev.plone.org/ticket/11245 进行讨论).

plone.app.discussion currently disables commenting for all containers (see https://dev.plone.org/ticket/11245 for discussion).

我在一个项目中使用了如下所示的猴子补丁程序,以缩短常规检查,并确保为我的文件夹内容类型启用了注释:

I used a monkey patch like the following in one project to short-circuit the normal check and make sure that commenting was enabled for my folderish content type:

from Acquisition import aq_inner
from Products.highcountrynews.content.interfaces import IHCNNewsArticle
from plone.app.discussion.conversation import Conversation
old_enabled = Conversation.enabled
def enabled(self):
    parent = aq_inner(self.__parent__)
    if parent.portal_type == 'my_portal_type':
        return True
    return old_enabled(self)
Conversation.enabled = enabled

"my_portal_type"当然是您要启用评论的portal_type.

where 'my_portal_type' is, of course, the portal_type you want commenting enabled for.

这篇关于无法激活有关克隆敏捷类型(文件夹)的讨论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 17:58