{"id":10,"date":"2007-07-07T21:33:27","date_gmt":"2007-07-08T04:33:27","guid":{"rendered":"http:\/\/www.reisun.com\/2007\/07\/07\/workflow-madness-in-plone\/"},"modified":"2007-07-07T21:33:27","modified_gmt":"2007-07-08T04:33:27","slug":"workflow-madness-in-plone","status":"publish","type":"post","link":"https:\/\/www.reisun.com\/?p=10","title":{"rendered":"Workflow Madness in Plone"},"content":{"rendered":"<p>I&#8217;ve been having some difficulty implementing student homework submission. I&#8217;ve gotten a crude hack working, but trying to improve it has been more difficult than I imagined. The following excerpt from\u00c2\u00a0<a href=\"http:\/\/www.zopelabs.com\/cookbook\/1029298314\">http:\/\/www.zopelabs.com\/cookbook\/1029298314<\/a>\u00c2\u00a0will 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!)<\/p>\n<p><code><br \/>\nI 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.<\/code><code>To fix this, I went into portal_properties\/navigation and changed default.content_status_modify.success from \"action:view\" to \"url:..\/folder_contents\"<\/code><code> <\/code><code>Now when I publish an item, it dumps me into a view of the folder where it came from.<\/code><code>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.<\/code><code>Fixing Plone's response (was Re: Re: Use one script for many types of objects.) by sh23 - 2004-10-14<br \/>\nI wanted to only be placed in the directory when the object was no<br \/>\nlonger there. In \/Plone\/portal_properties\/navigation_properties<br \/>\ninstead of modifying default.content_status_modify.success, I created<br \/>\na new entry:<\/p>\n<p>default.content_status_modify.gone url:..\/folder_contents<\/p>\n<p>I then modified (a custom copy of)<br \/>\nportal_skins\/plone_scripts\/form_scripts\/content_status_modify by<br \/>\nreplacing 'success' with status_string in the return statement, and<br \/>\nthen adding the following immediately before the return statement:<\/p>\n<p>if context.restrictedTraverse(context.getPhysicalPath(), default=None) == None:<br \/>\nstatus_string = 'gone'<br \/>\nelse:<br \/>\nstatus_string = 'success'<\/p>\n<p>This is known to work with CMF 1.4 and Plone 1.1 24 June development version.<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been having some difficulty implementing student homework submission. I&#8217;ve gotten a crude hack working, but trying to improve it has been more difficult than I imagined. The following excerpt from\u00c2\u00a0http:\/\/www.zopelabs.com\/cookbook\/1029298314\u00c2\u00a0will help, I wanted to copy it here so I can refer to it later. (For a while I had forgotten how to access this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,18],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-web","category-webcourse"],"_links":{"self":[{"href":"https:\/\/www.reisun.com\/index.php?rest_route=\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reisun.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reisun.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reisun.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reisun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10"}],"version-history":[{"count":0,"href":"https:\/\/www.reisun.com\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.reisun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reisun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reisun.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}