[Zope-CMF] multiple publish of Documents, Images

Florent Guillaume fg@nuxeo.com
Thu, 19 Sep 2002 13:16:52 +0000 (UTC)


Do a try/except around doActionFor to identify which object has
problems. Then for that object check which workflows it effectively
follows in the Workflow tab of the ZMI for that object. That'll help
diagnose things.

Florent

Jens Hauser <hauser@jam-gmbh.de> wrote:
> Hi all,
> 
> yes, it's me again... :-(
> 
> 
> I can reduce my problem to the following situation:
> 
> If I use Chris' original script I get the error message listed below -
> workflow exception.
> 
> ##############CUT original script
> wf_tool = context.portal_workflow
> stack = [context]
> for object in stack:
>      wf_tool.doActionFor( object, 'publish', comment="Your comment" )
>      if object.isPrincipiaFolderish:
>         children = objects.contentValues()
>         for child in children:
>           if not id in ['allgemeines','img','pdf','aktuelles',
>                         'Members','news','thumbs']:
>             stack.append(child)
> ##############CUT original script
> 
> If I reduce the script to publish only an actual image (and do not look for
> any subdirectories within the actual directory, that very special image is
> published. Seems like some of the objects within the directory cannot be
> published or lead into the given error...
> 
> Anybody out there with an idea? It's blowing my mind ...
> 
> Regards,
> Jens
> 
> >>> Zope Error
> >>> Zope has encountered an error while publishing this resource.
> >>> 
> >>> Error Type: WorkflowException
> >>> Error Value: No workf
> >>> found.
> >>> 
> >>> Traceback (innermost last):
> >>>   File /opt/zope/lib/python/ZPublisher/Publish.py, line 223, in
> publish_module
> >>>   File /opt/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
> >>>   File /opt/zope/lib/python/Zope/__init__.py, line 226, in
> >>> zpublisher_exception_hook
> >>>     (Object: LockableItem)
> >>>   File /opt/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
> >>>   File /opt/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
> >>>     (Object: publish_site)
> >>>   File /opt/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object
> >>>     (Object: publish_site)
> >>>   File /opt/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in
> >>> __call__
> >>>     (Object: publish_site)
> >>>   File /opt/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in
> >>> _bindAndExec
> >>>     (Object: publish_site)
> >>>   File /opt/zope/lib/python/Products/PythonScripts/PythonScript.py, line
> 363,
> >>> in _exec
> >>>     (Object: publish_site)
> >>>     (Info: ({'script': <PythonScript instance at 8b197f0>, 'context':
> >>> <PortalFolder instance at 8bfba28>, 'container': <CMFSite instance at
> >>> 9633ab8>, 'traverse_subpath': []}, (), {}, None))
> >>>   File Script (Python), line 4, in publish_site
> >>>     (Object: guarded_getattr)
> >>>   File /opt/zope/lib/python/Products/CMFCore/WorkflowTool.py, line 499, in
> >>> doActionFor
> >>>     (Object: LockableItem)
> >>> WorkflowException: (see above)
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com