WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Preventing Contributors from Editing Sched Posts? (19 posts)

  1. nickaster
    Member
    Posted 2 years ago #

    Is it normal default behavior for a contributor (user level) to be able to edit posts once they are saved as pending and scheduled? I seem to think it really should not be since you don't want guest editors to be able to edit once you have finalized things.

    HOw can I prevent this?

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    What if you schedule the posts at approval?

  3. nickaster
    Member
    Posted 2 years ago #

    That's essentially what I do.

    But the "contributors" can still edit them. It seems they can edit them all along until they are published.

  4. nickaster
    Member
    Posted 2 years ago #

    I just ran an experiment with another site... looks like this is indeed the standard behavior. Seems like a really bad idea to have guest authors able to edit things that are past the draft stage.

    The closest explanation I can find to fix this is here:
    http://stackoverflow.com/questions/3391417/how-can-i-set-wordpress-roles-such-that-once-a-contributors-post-is-scheduled-t

    But I don't understand the PHP. Anyone know what needs to be added to functions.php to accomplish this?

  5. nickaster
    Member
    Posted 2 years ago #

    Anyone got a way around this? Seems like a pretty basic problem. I'm surprised WP would allow editing by default here.

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    I can't replicate this using Twenty Eleven and the standard Contributor menus. How exactly are Contributors accessing scheduled posts in your tests?

  7. nickaster
    Member
    Posted 2 years ago #

    Interesting... so you're saying this could be theme dependent?

    Well,

    1) I created a fake contributor level account, wrote a post and submitted for review.
    2) Then logged in as admin and scheduled the post
    3) Then I logged back in as the contributor and sure enough, I was able to make edits to the scheduled post.

    I also tested this on someone else's site which is far more generic than mine, same results!

    Is this *supposed* to happen?

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    Is this *supposed* to happen?

    No. And I couldn't replicate it using exactly the same steps as you used. My "contributor" cannot even view a scheduled post via Posts-> All Posts. Try:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

  9. nickaster
    Member
    Posted 2 years ago #

    fascinating... okay, I've done it. Went through everything above. My fake contributor user can still edit scheduled posts.

    But before I tinker further, hopefully this was clear: The contributor CAN NOT edit just any post. Only the ones for which he is an author. Still, I don't want this to be possible once something is scheduled.

    Is that still abnormal?

  10. esmi
    Forum Moderator
    Posted 2 years ago #

    How exactly is your test contributors accessing scheduled posts in your tests?

  11. nickaster
    Member
    Posted 2 years ago #

    Just logging in. Clicking "posts" and "all posts" and sure enough their post is visible and editable, despite it having been scheduled by the admin.

  12. esmi
    Forum Moderator
    Posted 2 years ago #

    Whatever it is, it's specific to your install. I can't replicate it on any of my test sites.

  13. nickaster
    Member
    Posted 2 years ago #

    Okay, wait a minute here.

    I just replicated the problem *again* on a totally separate wordpress site. Blank starter site, not a single plugin.

    Created a contributor.
    Logged in as contributor and posted a post for review
    Logged back in as admin and scheduled the post.
    Logged in as contributor and sure enough, I can edit away.

    I'm starting to think this is actually the default... am I crazy?

  14. esmi
    Forum Moderator
    Posted 2 years ago #

    Logged in as contributor and posted a post for review

    Aha! A contributor can edit their own Posts - irrespective of who scheduled it.
    http://codex.wordpress.org/Roles_and_Capabilities#Contributor

  15. nickaster
    Member
    Posted 2 years ago #

    Yup. That's what I was afraid of.

    Seems like a bad idea, no?

  16. esmi
    Forum Moderator
    Posted 2 years ago #

    Um - not sure. I understand what you mean but I do think it's one of those pov issues. The only thing I can suggest if you want to get some serious eyes on this is to post it in Trac as a potential bug.

  17. nickaster
    Member
    Posted 2 years ago #

    Thanks man, I'll give it a shot!

    At least seems like it would be a worthy plugin concept.

  18. esmi
    Forum Moderator
    Posted 2 years ago #

    You should be able to pull editing capability for all Contributor users via any decent role management plugin such as http://wordpress.org/extend/plugins/user-role-editor/

  19. nickaster
    Member
    Posted 1 year ago #

    So... incidentally, someone I work with has just written a plugin to solve this problem:

    http://wordpress.org/extend/plugins/restrict-contributors-from-scheduled-posts/

    Seems to work!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.