Plone comment error

Categorie: Coding and stuff, Plone
tags: 21

Terwijl ik druk bezig ben met het afronden van een nieuwe Plone site, een intranet dit keer, loop ik tegen een vreemde foutmelding aan bij het plaatsen van een discussie-item. Heel vreemd, aangezien ik de betreffende functionaliteit eerder tijdens de ontwikkeling zonder problemen heb kunnen gebruiken.

Traceback

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
  Module ZPublisher.Publish, line 46, in call_object
  Module grokcore.view.components, line 100, in __call__
  Module grokcore.view.components, line 104, in _render_template
  Module five.grok.components, line 134, in render
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:/home/jdewit/.buildout/eggs/plonetheme.sunburst-1.2.7-py2.7.egg/plonetheme/sunburst/skins/sunburst_templates/main_template.pt
   - Line 134, Column 12
   - Expression: <StringExpr u'plone.belowcontent'>
   - Names:
      {'args': (),
       'container': <Item at /sciencelab/berichten/zakelijk/een-zakelijk-bericht>,
       'context': <Item at /sciencelab/berichten/zakelijk/een-zakelijk-bericht>,
       'default': <object object at 0xb72a5698>,
       'here': <Item at /sciencelab/berichten/zakelijk/een-zakelijk-bericht>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0xb3d75374>,
       'request': <HTTPRequest, URL=http://192.168.100.39:8080/sciencelab/berichten/zakelijk/een-zakelijk-bericht/view>,
       'root': <Application at >,
       'static': <five.grok.components.ZopeTwoDirectoryResource object at 0xb3d30dcc>,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0xd75b20c>,
       'traverse_subpath': [],
       'user': <PloneUser 'jdewit'>,
       'view': <virtualsciences.content.bericht.View object at 0xb3d307cc>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0xb342f8ac>}
  Module zope.contentprovider.tales, line 77, in __call__
  Module zope.viewlet.manager, line 112, in update
  Module zope.viewlet.manager, line 118, in _updateViewlets
  Module plone.app.discussion.browser.comments, line 263, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 138, in update
  Module z3c.form.action, line 99, in execute
  Module z3c.form.button, line 315, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.app.discussion.browser.comments, line 232, in handleComment
  Module Products.CMFCore.WorkflowTool, line 263, in getInfoFor
WorkflowException: No workflow provides '${name}' information.
> /home/jdewit/.buildout/eggs/Products.CMFCore-2.2.6-py2.7.egg/Products/CMFCore/WorkflowTool.py(263)getInfoFor()
-> raise WorkflowException(msg)

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

Zoek de verschillen

Dus, opzoek naar de verschillen. Bovenstaande foutmelding geeft direct aan dit dit issue met de workflow te maken heeft. Het positieve is, dat ik inderdaad sinds de vorige test een wijziging heb doorgevoerd aan de workflow. Maar die zou geen invloed mogen hebben op discussie-items. Content die voorzien was van de standaard workflow (simple_publication_workflow) is voorzien van de intranet workflow, maar andere content is ongewijzigd gebleven.

Met andere woorden, zeer waarschijnlijk een bug in plone.app.discussion. Gelukkig is het toepassen van de One State Workflow (one_state_workflow) afdoende om het issue te omzeilen. Nu alleen nog achterhalen of dit reeds als bug is ingeschoten. Of wellicht al is gefixed in versie 2.1.8 of 2.2.0 van plone.app.discussion.

Laadtijd: