Workflow Madness in Plone
I’ve been having some difficulty implementing student homework submission. I’ve gotten a crude hack working, but trying to improve it has been more difficult than I imagined. The following excerpt from http://www.zopelabs.com/cookbook/1029298314 will help, I wanted to copy it here so I can refer to it later. (For a while I had forgotten how to access this page!)
I used your idea but ran into a problem because the default action after a change in status is to view the object (at the old location), which results in an object-not-found error.To fix this, I went into portal_properties/navigation and changed default.content_status_modify.success from "action:view" to "url:../folder_contents"
Now when I publish an item, it dumps me into a view of the folder where it came from.
It would be nice if it would go to a view of the newly-moved object, but I haven't been able to get necessary redirects working.
Fixing Plone's response (was Re: Re: Use one script for many types of objects.) by sh23 - 2004-10-14
I wanted to only be placed in the directory when the object was no
longer there. In /Plone/portal_properties/navigation_properties
instead of modifying default.content_status_modify.success, I created
a new entry:
default.content_status_modify.gone url:../folder_contents
I then modified (a custom copy of)
portal_skins/plone_scripts/form_scripts/content_status_modify by
replacing 'success' with status_string in the return statement, and
then adding the following immediately before the return statement:
if context.restrictedTraverse(context.getPhysicalPath(), default=None) == None:
status_string = 'gone'
else:
status_string = 'success'
This is known to work with CMF 1.4 and Plone 1.1 24 June development version.