尝试更改图像工作流程时出错
简而言之,当我进入站点设置时 ->类型并尝试将图像的工作流程从“无工作流程”更改为任何其他工作流程,我收到以下错误:
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。在暂存上运行备份并将暂存备份文件和 blob 存储复制到生产。生产工作顺利;似乎是Staging的完美克隆。
后来,我们想迁移到 4.1.1,因此我们在 4.1.1 上创建了另一个安装,并从生产到新实例重复上述过程。经过一天的测试,似乎有效。太酷了,我们现在有一个 4.1.1 Production 盒子了。一周后,用户希望图像在与所有其他内容相同的工作流程(内联网/外联网)下运行,就在那时我遇到了错误。
我可以通过ZMI Portal_workflow工具更改工作流程,没有任何明显的问题。
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'
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.
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.
I can change the workflow through the ZMI portal_workflow tool without any apparent problems.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看产品代码,似乎当您更改内容类型的工作流程时,padiscussion 产品会尝试更新其配置,但在您的实例中无法检索注册表。
作为一种快速解决方案,您可以尝试通过在其中一个产品的 zcml 中添加此代码来强制包含注册表:
然后:
1- 转到 zmi -> >您的站点并检查您的克隆站点中是否存在名为“portal_registry”的项目
2- 转到 zmi ->您的网站 ->选项卡“组件”并检查是否存在此注册:
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.
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:
then:
1- go to zmi -> your site and check if in your plone site exists an item called "portal_registry"
2- go to zmi -> your site -> tab "Components" and check if exists this registration:
有同样的问题,可以通过导入配置文件“配置注册表”的“管理配置注册表”和“克隆缓存”步骤来解决。
Had the same problem, could solve it by importing the steps 'Manage the configuration registry' and ' Plone caching' of the profile 'Configuration registry'.