Forums

Edit Flow
Custom Post status reverting to Draft (24 posts)

  1. gyutae
    Member
    Posted 10 months ago #

    As an admin on my blog, I change the post status of a post from Pending Review to a Custom post status from Edit Flow. However, when an editor goes into the same post, the only Save option is to Save as Draft. Once that is clicked, the post status goes back to Draft rather than staying as the Custom one.

    This problem popped up after upgrading to Edit Flow 0.6.4. Any ideas on what changed?

  2. Daniel Bachhuber
    Member
    Posted 10 months ago #

    Few questions:

    • Does this happen in all browsers?
    • Does this happen to more than one user, or just the editor
    • Can you upload a screenshot of what your editor sees?
  3. gyutae
    Member
    Posted 10 months ago #

    Hey Daniel,

    Yes, this happens in all browsers. The Save button has been replaced by the Save Draft button it looks like. And when someone clicks on it, the post status goes from Custom back to Drafts.

    This happens for all users except the admin, who has the option to change the post status.

    I'm also using Role Scoper 1.3.44 if that helps at all. Let me know.

  4. Daniel Bachhuber
    Member
    Posted 10 months ago #

    I'm unable to reproduce on my machine, unfortunately. Based on your report, it sounds like the Javascript is breaking on the create/edit post view for all of your users.

    When they edit a post, are they able to select a status from the post status dropdown? If so, which statuses appear?

    What changes if any did you make at the same time you upgraded Edit Flow and/or noticed this issue?

  5. gyutae
    Member
    Posted 10 months ago #

    Users don't have the option to select a status from the post status dropdown (this is intentional). Only admins have this permission.

    However, once a post status is changed by admin to a custom one, and a non-admin user goes and edits the same post, the only option is Save Draft (should be Save so that the custom post status is preserved).

    Any ideas?

  6. Daniel Bachhuber
    Member
    Posted 10 months ago #

    Ah, that makes a lot more sense. What's your "default post status" in the Edit Flow options by chance? Also, how are you removing the post status dropdown?

    In v0.6.4, we added code so that the default post status is respected for contributors. Previously, it would default to "Draft" because there wasn't the appropriate information in the DOM. Because there's no post status dropdown for your users, I suspect it's reverting to whatever your default status is.

  7. gyutae
    Member
    Posted 10 months ago #

    The "default post status" in Edit Flow is Draft. I think the post status dropdown is being removed by the Adminimize plugin. Any way we can make that work?

  8. gyutae
    Member
    Posted 10 months ago #

    Hey Dan,

    Any update on a potential fix? I may need to downgrade my version of Edit Flow since it is causing issues in the editorial process. Just wanted to check in on status, when you get a chance. Thanks, appreciate the plugin!

  9. Daniel Bachhuber
    Member
    Posted 10 months ago #

    Can you share a screengrab of your Adminimize settings?

    I tried installing it, disabling Publishing Actions for editors, and the current custom status persists just fine when I hit save.

    As it turns out, Adminimize just hides that div with CSS, which means editors can change the status if they know how to manipulate the DOM with Firebug.

    I suspect the Edit Flow Javascript is conflicting with something else and not firing. Does the media uploader work for editors?

  10. gyutae
    Member
    Posted 10 months ago #

    I tried deactivating the Adminimize plugin and I still get the same issue. Does this mean that Adminimize is not the cause of the problem?

    Yes, the media uploader works for editors.

  11. Daniel Bachhuber
    Member
    Posted 10 months ago #

    Odd, probably. What other plugins do you have installed?

  12. gyutae
    Member
    Posted 10 months ago #

    I just tried deactivating all plugins, but I still get the same issue. Not really sure what it could be. Thoughts?

  13. gyutae
    Member
    Posted 10 months ago #

    Also, just reverted back to 0.6.3 and it does work properly now.. so it's definitely something that was introduced in 0.6.4.

    Hope that helps.

  14. gyutae
    Member
    Posted 10 months ago #

    Hm, now I seem to be having another issue. When clicking on Quick Edit for a post, the Status box only shows 3 options for Published, Pending Review, and Draft. Posts that have custom statuses in Edit Flow show as Published in the Quick Edit Status box. However, when clicking through to the Edit Post page, the drop down shows all of the custom statuses.

    Do you see that as well?

  15. Scott Bressler
    Member
    Posted 10 months ago #

    I believe that last bit is because we actually made Quick Edit work for custom statuses in v0.6.4. We're still investigating the reverting issue you reported.

  16. Scott Bressler
    Member
    Posted 10 months ago #

    I just tried to reproduce:

    Logged in as admin, created a post and saved as waiting for feedback
    Logged in as editor, went to edit same post

    I saw all custom status options as an editor. I was able to change the post status to a different custom status.

    Is there something more to this report that I'm missing? If you were willing to upgrade to 0.6.4 again, let us know if you still see this issue.

    Thanks,
    Scott

  17. Daniel Bachhuber
    Member
    Posted 9 months ago #

    This thread is closed as wontfix.

  18. gyutae
    Member
    Posted 7 months ago #

    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!

  19. Daniel Bachhuber
    Member
    Posted 6 months ago #

    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

  20. kevinB
    Member
    Posted 6 months ago #

    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.

  21. Daniel Bachhuber
    Member
    Posted 6 months ago #

    @kevinB Is there better behavior you might suggest?

  22. kevinB
    Member
    Posted 6 months ago #

    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.

  23. kevinB
    Member
    Posted 6 months ago #

    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.

  24. Daniel Bachhuber
    Member
    Posted 4 months ago #

    Hey folks,

    I have two possible fixes outlined and would love to hear what you think of them on that thread.

Reply

You must log in to post.

About this Plugin

About this Topic