Hi,
We've got an app built with Toolset on CAPTA.org that allows moderators (an Access role based on Editor) to log in and then edit posts that have been submitted by others. The posts are in draft status when the moderator reviews them, and then they can either publish them (which is working fine), or edit them by clicking on an edit button which takes them to an edit form.
I had it working fine for a good long while, but something changed (not sure if it was a plugin upgrade or something else) and all of a sudden I have certain roles for whom that edit button does not appear. I've looked at everything I can think of but can't figure out why that Edit button doesn't display. Hoping you can take a look and tell me what I'm missing. Here's the information you need to observe the behavior.
If you go to hidden link and log in with these credentials, which have a WordPress Adminstrator role:
- edit: removed by support
...you'll see items waiting for review that have both an Edit and a Publish button. (By the way, the item "The Stooges" is a test item you can play with.) But when you log in as a user who is assigned the "Commission Moderators - Community Concerns" role with these credentials:
-edit: removed by support
...you won't see the Edit button (but should!).
Here are are the various elements that are part of the equation:
If you go to hidden link (titled "Resource Library Admin Dashboard" under Pages) displays a series of Views. Access tags show different views to different people, depending on their role. Let's focus on this one:
[toolset_access role="Administrator,Commission Moderators - Community Concerns" operator="allow"]
<h3 class="submitted_to">Submitted to the Community Concerns Commission</h3>
[wpv-view name="resources-submitted-to-community-concerns-commission"]
[/toolset_access]
...which only displays to users who belong to the role "Administrator" or to "Commission Moderators - Community Concerns"
The View (named "Resources Submitted to Community Concerns Commission") drops in a view template on line 48 of the loop editor, and further down in the "Templates for this View" section you'll see the code for the Edit and Publish buttons, which includes this code for the Edit Post link:
[toolset-edit-post-link content_template_slug='edit-learning-hub-resource' target='self' class='btn']Edit[/toolset-edit-post-link]
Works fine for Administrators, which tells me the issue lies in the Access settings somewhere. If you go to Toolset > Access Control > Toolset Forms, you'll see that the role "Commission Moderators - Community Concerns" has all permissions, including "Edit Others Custom Post with the Form 'Edit a Resource Library Resource'", which is the form that Edit link points to. (See screenshot.)
If we go to Toolset > Access Control > Custom Roles and examine the permissions for the "Commission Moderators - Community Concerns" role, they seem to have all the necessary permissions, including "edit_others_posts".
I also note, when logged in as capta_community_concerns_commission_moderator that the page with the edit form itself can't be found, although it displays fine as an administrator:
hidden link
I'd really appreciate you taking a look to see if you can tell me what I'm missing.
Thanks!
David