[Zope-CMF] Workflow - Publish All Objects in Folder

Roel Van den Bergh roel@planetinterior.com
Wed, 3 Apr 2002 09:28:18 +0200


After running the following script under winZope 2.5.0 and CMF 1.2 with CMF
Workflow Revision 2 (Submitted by: runyaga & Last Edited: 2002-02-27, found
on ZopeLabs)

#create (Python) Script called, publish_all
wf_tool=context.portal_workflow

print 'go go auto-publish'
for o in context.contentValues():
    try:
        wf_tool.doActionFor(o, 'publish')
    except:
        print o.objectId() + ' didnt publish '

return printed

I get the following error:

Error Type: AttributeError
Error Value: objectId

----

Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the HTML
source for this page.

If the error persists please contact the site maintainer. Thank you for your
patience.

Traceback (innermost last):
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 150, in
publish_module
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 114, in
publish
  File C:\Program Files\Zope\lib\python\Zope\__init__.py, line 158, in
zpublisher_exception_hook
    (Object: FTP)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 98, in
publish
  File C:\Program Files\Zope\lib\python\ZPublisher\mapply.py, line 88, in
mapply
    (Object: publish_all)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 39, in
call_object
    (Object: publish_all)
  File C:\Program Files\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line
252, in __call__
    (Object: publish_all)
  File C:\Program Files\Zope\lib\python\Shared\DC\Scripts\Bindings.py, line
283, in _bindAndExec
    (Object: publish_all)
  File C:\Program
Files\Zope\lib\python\Products\PythonScripts\PythonScript.py, line 291, in
_exec
    (Object: publish_all)
    (Info: ({'script': <PythonScript instance at 01FDB948>, 'context':
<PortalFolder instance at 01BD0F48>, 'container': <PortalFolder instance at
01BD0F48>, 'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 9, in publish_all
  File C:\Program Files\Zope\lib\python\AccessControl\ZopeGuards.py, line
47, in guarded_getattr
    (Object: Download)
AttributeError: (see above)