尝试更改图像工作流程时发生错误 [英] An error when trying to change Image workflow

查看:90
本文介绍了尝试更改图像工作流程时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简而言之,当我进入网站设置"->类型"并尝试将图像的工作流程从无工作流程"更改为任何其他工作流程时,会出现以下错误:

In short, when I go into Site Setup -> Types and try and change the workflow for Images from "No Workflow" to any other workflow, I get the following error:

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.app.controlpanel.types, line 165, in __call__
  Module zope.event, line 31, in notify
  Module zope.component.event, line 24, in dispatch
  Module zope.component._api, line 136, in subscribers
  Module zope.component.registry, line 321, in subscribers
  Module zope.interface.adapter, line 585, in subscribers
  Module plone.app.discussion.browser.controlpanel, line 181, in notify_configuration_changed
AttributeError: 'NoneType' object has no attribute 'forInterface'

我怀疑我们设置此Plone实例的方式导致了问题.我们进行了初始站点建设,安装了4.0.8(阶段).我们为生产设置了另一个4.0.8安装.在暂存上运行备份,并将暂存备份文件和blobstorage复制到生产中.生产工作良好;似乎是分期的完美克隆.

I suspect the way we setup this Plone instance caused the issue. We have a 4.0.8 install (Staging) where we did our initial site construction. We setup another 4.0.8 install for production. Ran a backup on Staging and copied the Staging backup files and blobstorage over to Production. Production worked fine; appeared to be a perfect clone of Staging.

稍后,我们想移至4.1.1,因此我们在4.1.1上创建了另一个安装,并重复了上述从Production到新实例的过程.经过一天的测试,它似乎可以工作.太好了,我们现在有一个4.1.1生产盒.一周后,用户希望Image与其他所有内容在相同的工作流(Intranet/Extranet)下运行,这就是我遇到错误的时候.

Later, we wanted to move to 4.1.1, so we created another install on 4.1.1 and repeated the above process from Production to our new instance. After a day of testing, it appears to work. Cool, we have a 4.1.1 Production box now. Week later, users want Images to operate under the same workflow (Intranet/Extranet) as all the other content and that's when I ran into the error.

可以通过ZMI portal_workflow工具更改工作流程,而没有任何明显的问题.

I can change the workflow through the ZMI portal_workflow tool without any apparent problems.

推荐答案

查看

Looking at the product code, It seems that when you change the contenttype's workflow the p.a.discussion product tries to update its configuration but in your instance fails to retrieve the registry.

作为一种快速的解决方案,您可以尝试通过在一个产品的zcml中添加以下代码来强制包含注册表:

As a fast solution you could try to force the inclusion of the registry by adding in a zcml of one of your products this code:

<include package="plone.app.registry" />

然后:

1-转到zmi->您的站点,并检查您的plone站点中是否存在一个名为"portal_registry"的项目

1- go to zmi -> your site and check if in your plone site exists an item called "portal_registry"

2-转到zmi->您的站点->标签组件",然后检查是否存在此注册:

2- go to zmi -> your site -> tab "Components" and check if exists this registration:

<utility interface="plone.registry.interfaces.IRegistry"
         object="portal_registry" />

这篇关于尝试更改图像工作流程时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆