我在Drupal8.7.8站点上启用内容审核模块(content_moderation)时遇到了麻烦。
在安装过程中,一切看起来都很好,drush en content_moderation完成时没有错误,工作流模块之前已经启用了。
安装后,编辑工作流将丢失,但是可以创建一个新的内容审核工作流。
所有角色权限都可用,适度状态小部件显示在所选类型的节点上。但是使用小部件没有效果,节点不会被发布或未发布。
适当地创建了用于内容调整的数据库表(即。content_moderation_state和另外三个名字相似的人)。
此外,视图moderated_content显示“中断/缺失处理程序”,其中筛选标准“内容修订:适度状态(公开)”和“内容修订:审核状态(<>发布)”应该是。
单击已损坏/缺失的处理程序字段将显示两个中断处理程序的一些详细信息:
The handler for this item is broken or missing. The following details are available:
id: moderation_state_1
table: node_field_revision
field: moderation_state
relationship: none
group_type: group
admin_label:
operator: not in
group: 1
exposed:
is_grouped:
entity_type: node
plugin_id: moderation_state_filter
Enabling the appropriate module may solve this issue. Otherwise, check to see if there is a module update available.第二个字段显示了以下信息:
id: moderation_state
table: node_field_revision
field: moderation_state
relationship: none
group_type: group
admin_label:
operator: in
group: 1
exposed: 1
is_grouped:
entity_type: node
plugin_id: moderation_state_filter我也不能在视图中添加任何与适度状态相关的字段,比如“适度状态”。字段不显示在“添加字段”对话框中。
我在一个普通的Drupal 8.7.8上设置内容审核没有问题,它只是在这个现有的站点上失败了(相同的版本)。
我已经尝试过通过不同的方式,通过钻取和手动恢复站点,重新安装工作流和content_moderation。我卸载了所有定制模块和补丁,并重新安装了content_moderation。
是否有任何模块(工作台除外)或设置已知会导致内容调整问题?
有什么想法会导致这个问题,或者从哪里开始寻找?
非常感谢!
发布于 2019-10-31 20:39:58
德鲁巴斯拉克频道的人把我引向了正确的方向。我在内容调整指南中添加了详细的故障排除信息。
如果您在网站上启用内容审核(drush en content_moderation),而该站点没有使用Drupal的标准配置文件作为基础安装,您将遇到一些问题,在使用内容审核之前需要几个手动步骤,如指南中所详细介绍的。
如果启用内容审核时未创建编辑工作流,则可以手动创建新工作流并分配与新工作流一起使用的内容类型,也可以手动导入编辑工作流。
编辑工作流的模板是:
langcode: en
status: true
dependencies:
module:
- content_moderation
id: editorial
label: Editorial
type: content_moderation
type_settings:
states:
archived:
label: Archived
weight: 5
published: false
default_revision: true
draft:
label: Draft
published: false
default_revision: false
weight: -5
published:
label: Published
published: true
default_revision: true
weight: 0
transitions:
archive:
label: Archive
from:
- published
to: archived
weight: 2
archived_draft:
label: 'Restore to Draft'
from:
- archived
to: draft
weight: 3
archived_published:
label: Restore
from:
- archived
to: published
weight: 4
create_new_draft:
label: 'Create New Draft'
to: draft
weight: 0
from:
- draft
- published
publish:
label: Publish
to: published
weight: 1
from:
- draft
- published
entity_types:
node: null
default_moderation_state: draft将模板复制到一些yml文件中,并使用drush config:import -分部导入它。
上的中断/缺失处理程序
如果不存在分配给内容类型的审核工作流,则会发生此错误。无论您只是导入上面描述的编辑工作流程,还是创建了自定义的审核工作流,您都必须确保它至少有一种内容类型分配给它。只需编辑您的审核工作流,滚动到页面底部,并选择至少一个与此工作流一起使用的内容类型。保存更改后,慢化内容上的“断开/缺失处理程序”将消失,/admin/ Content /moderated的视图将如预期的那样工作。
https://drupal.stackexchange.com/questions/287834
复制相似问题