3

我创建了一个不复杂的内容类型并允许讨论。显示添加评论的表单,但是当发表评论时,我得到了下一个错误:

2013-03-09 22:24:32 ERROR root Exception while rendering an error message
Traceback (most recent call last):
  File "/home/daniel/.buildout/eggs/Zope2-2.13.19-py2.6.egg/OFS/SimpleItem.py", line 242, in raise_standardErrorMessage
    v = s(**kwargs)
  File "/home/daniel/.buildout/eggs/Products.CMFCore-2.2.7-py2.6.egg/Products/CMFCore/FSPythonScript.py", line 127, in __call__
    return Script.__call__(self, *args, **kw)
  File "/home/daniel/.buildout/eggs/Zope2-2.13.19-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__
    return self._bindAndExec(args, kw, None)
  File "/home/daniel/.buildout/eggs/Zope2-2.13.19-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/home/daniel/.buildout/eggs/Products.PythonScripts-2.13.2-py2.6.egg/Products/PythonScripts/PythonScript.py", line 344, in _exec
    result = f(*args, **kw)
  File "Script (Python)", line 34, in standard_error_message
  File "/home/daniel/.buildout/eggs/Zope2-2.13.19-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__
    return self._bindAndExec(args, kw, None)
  File "/home/daniel/.buildout/eggs/Zope2-2.13.19-py2.6.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/home/daniel/.buildout/eggs/Products.CMFCore-2.2.7-py2.6.egg/Products/CMFCore/FSPageTemplate.py", line 237, in _exec
    result = self.pt_render(extra_context=bound_names)
  File "/home/daniel/.buildout/eggs/Products.CMFCore-2.2.7-py2.6.egg/Products/CMFCore/FSPageTemplate.py", line 177, in pt_render
    self, source, extra_context
  File "/home/daniel/.buildout/eggs/Zope2-2.13.19-py2.6.egg/Products/PageTemplates/PageTemplate.py", line 79, in pt_render
    showtal=showtal)
  File "/home/daniel/.buildout/eggs/zope.pagetemplate-3.5.2-py2.6.egg/zope/pagetemplate/pagetemplate.py", line 113, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations)()
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 271, in __call__
    self.interpret(self.program)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 888, in do_useMacro
    self.interpret(macro)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
    self.do_optTag(stuff)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 518, in do_optTag
    return self.no_tag(start, program)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 513, in no_tag
    self.interpret(program)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 852, in do_condition
    self.interpret(block)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/home/daniel/.buildout/eggs/zope.tal-3.5.2-py2.6.egg/zope/tal/talinterpreter.py", line 742, in do_insertStructure_tal
    structure = self.engine.evaluateStructure(expr)
  File "/home/daniel/.buildout/eggs/Zope2-2.13.19-py2.6.egg/Products/PageTemplates/Expressions.py", line 218, in evaluateStructure
    text = super(ZopeContext, self).evaluateStructure(expr)
  File "/home/daniel/.buildout/eggs/zope.tales-3.5.2-py2.6.egg/zope/tales/tales.py", line 696, in evaluate
    return expression(self)
  File "/home/daniel/.buildout/eggs/zope.contentprovider-3.7.2-py2.6.egg/zope/contentprovider/tales.py", line 77, in __call__
    provider.update()
  File "/home/daniel/.buildout/eggs/zope.viewlet-3.7.2-py2.6.egg/zope/viewlet/manager.py", line 112, in update
    self._updateViewlets()
  File "/home/daniel/.buildout/eggs/zope.viewlet-3.7.2-py2.6.egg/zope/viewlet/manager.py", line 118, in _updateViewlets
    viewlet.update()
  File "/home/daniel/.buildout/eggs/plone.app.discussion-2.1.9-py2.6.egg/plone/app/discussion/browser/comments.py", line 263, in update
    self.form.update()
  File "/home/daniel/.buildout/eggs/plone.z3cform-0.7.8-py2.6.egg/plone/z3cform/fieldsets/extensible.py", line 59, in update
    super(ExtensibleForm, self).update()
  File "/home/daniel/.buildout/eggs/plone.z3cform-0.7.8-py2.6.egg/plone/z3cform/patch.py", line 30, in GroupForm_update
    _original_GroupForm_update(self)
  File "/home/daniel/.buildout/eggs/z3c.form-2.5.1-py2.6.egg/z3c/form/group.py", line 138, in update
    self.actions.execute()
  File "/home/daniel/.buildout/eggs/z3c.form-2.5.1-py2.6.egg/z3c/form/action.py", line 99, in execute
    result = handler()
  File "/home/daniel/.buildout/eggs/z3c.form-2.5.1-py2.6.egg/z3c/form/button.py", line 315, in __call__
    return handler(self.form, self.action)
  File "/home/daniel/.buildout/eggs/z3c.form-2.5.1-py2.6.egg/z3c/form/button.py", line 170, in __call__
    return self.func(form, action)
  File "/home/daniel/.buildout/eggs/plone.app.discussion-2.1.9-py2.6.egg/plone/app/discussion/browser/comments.py", line 232, in handleComment
    comment_review_state = workflowTool.getInfoFor(comment, 'review_state')
  File "/home/daniel/.buildout/eggs/Products.CMFCore-2.2.7-py2.6.egg/Products/CMFCore/WorkflowTool.py", line 263, in getInfoFor
    raise WorkflowException(msg)
WorkflowException: No workflow provides '${name}' information.

我把代码放在这里。要重现错误运行setupenv.sh,然后bin/instance fg. 然后转到浏览器并使用degu.forum. 创建一个论坛文件夹,里面有一个论坛,然后放入一个论坛线程。然后尝试在论坛主题上发表评论。

4

1 回答 1

4

尽管 Martijn 的评论已经是解决方案并且错误消息非常清楚,但我将其发布为答案:

转到工作流工具并检查是否有任何工作流分配给讨论。

很可能不是。分配一个,fe 'one_state_workflow' 方便用于评论,并更新安全设置。

于 2013-03-11T15:46:55.753 回答