This thread is closed as wontfix.
Thread Starter
gyutae
(@gyutae)
Hello,
I’m reviving this thread because I’m still having this issue, upgrading from Edit Flow 0.6.3 to either 0.6.4 or 0.6.5.
Basically, when an Editor tries to save a post with a custom post status, the only option is for “Save Draft” rather than “Save”. So the post status always reverts back to Draft instead of staying at the same status as it should.
However, I was able to single out the specific instances of when this happens. If the user does not have permission to “Publish” through the Role Scoper plugin, this issue arises. For all other users who have the ability to Publish posts, this functionality works fine.
Does this give you any guidance as to any possible fixes? Again, it works fine in 0.6.3, but I’m running into this issue in later versions. Thanks!
It sounds like it might be related to this issue. We haven’t done much testing around Role Scoper and related role management plugins in the past, but I’ll try to add it to the table for v0.7
This doesn’t directly relate to Role Scoper. Based on a trial w/ 0.6.5, Edit Flow only makes the status selector and corresponding “Save” button available to users who have the publish_posts capability (as defined for the post type in question). This behavior is seen when you remove that capability from the Editor role, no matter what WP role editor is used.
@kevinb Is there better behavior you might suggest?
Sorry for the non-response here; been busy ironing out a plugin solution for custom post status capability enforcement 🙂
I think the publish_posts check was a sensible choice but will take some time tomorrow to organize a few thoughts for you.
What I’ve done with Press Permit is define and enforce a status-setting capability for each custom moderation status:
$page_type->cap->set_posts_pitch = "set_pages_pitch";
$page_type->cap->set_posts_approved = "set_pages_approved";
… and of course corresponding edit and delete caps:
$page_type->cap->edit_pitch_posts = "edit_pitch_pages";
$page_type->cap->edit_approved_posts = "edit_approved_pages";
At this point, I don’t automatically add those caps to the Editor role, but make it easy to do so.
I considered building an alternate has_cap engine that would support
$page_type_obj->caps['approved']->edit = "edit_approved_pages";
$page_type_obj->caps['approved']->set = "set_pages_approved";
…but decided not to take that on without some feedback / support from the WP dev community.
Hey folks,
I have two possible fixes outlined and would love to hear what you think of them on that thread.
Thread Starter
gyutae
(@gyutae)
Hey Dan,
Upgraded to 0.7.3 from 0.6.3 and now the custom status seems to hold whenever an Editor (without Publish capabilities) saves a post (rather than reverting back to Draft in previous versions). However, now the “Submit for Review” button is gone. Any ideas?
Yep, this is functionality that was just released: http://editflow.org/2012/07/03/v0-7-2-custom-statuses-for-contributors/
If you want it to revert to draft if a user without the ‘publish_post’ cap edits, that should be a pretty simple code snippet.
In the future, please open new threads for new support questions 🙂