Skip Navigation

[Resolved] Contributors should be able to edit their own content, but they can't.

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by Christian Cox 4 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1236597

I am trying to: Allow Contributors to edit their own "Dogs" (custom content type) posts. Contributors submit new Dogs. The Dogs are approved by an Admin. Once approved, Contributors should be able to edit. However, they only see a "view" option and are not allowed to edit their own Dogs.

Link to a page where the issue can be seen:

I expected to see:

Instead, I got:

#1236714

Hi, normally the Contributor role is locked out of their posts once they have been published. There is a capability you can add that gives them the ability to edit their own published posts, but those edits do not go through approval workflows. The edits are immediately published. If that's okay with you, I can share that capability and help you set it up. If not, custom code is required for this type of role modification, because you must also manage the post status whenever updating posts from the published status. Those posts must become unpublished, and must be returned to the review workflow.

#1236730

Hi Christian,

Thanks for your reply. So this is a feature and not a bug! It'd be nice if we had a way to route edits to approved content back through the approval process. Has anyone ever requested that? Is it possible? Meanwhile, yes, please share the capability for editing published posts.

Thanks,
Matt

#1237153

Here is some code you can add to your child theme's functions.php file to enable Contributors to edit published "dog" posts:

add_filter('init', function () {
    $role = get_role('contributor');
    $role->add_cap('edit_published_dogs');
});

However, I was running some tests and it seems that bringing Dogs under Access Control overrides this code. I'm asking my 2nd tier support team if this is expected, or if there is another workaround.

#1237754

Unfortunately our Access developers say this is the expected behavior, as contributors should not be able to edit their own published posts. A custom code solution would be required to enable this capability, and we don't have a cut and paste snippet available to allow this when Access control is active for a post type. If you need assistance with that, feel free to reach out to an independent professional at our portal: https://toolset.com/contractors

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.