[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

print 'go go auto-publish'
for o in context.contentValues():
        wf_tool.doActionFor(o, 'publish')
        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

Traceback (innermost last):
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 150, in
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 114, in
  File C:\Program Files\Zope\lib\python\Zope\__init__.py, line 158, in
    (Object: FTP)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 98, in
  File C:\Program Files\Zope\lib\python\ZPublisher\mapply.py, line 88, in
    (Object: publish_all)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 39, in
    (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
    (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)