Custom role cannot edit Venues or Organizers without edit_posts

Home Forums Calendar Products Events Calendar PRO Custom role cannot edit Venues or Organizers without edit_posts

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #98465
    integrity
    Participant

    I’ve created a custom role with the purpose of editing events, venues, and organizers but not posts, pages, or other CPTs. Currently I can create events without problem but I get a “You do not have sufficient permissions to access this page.” error whenever I try and create a new organizer or venue.

    The custom role is defined in a separate plugin that creates the role on the activation hook.
    This gist is the code for the function that runs on activation. https://gist.github.com/embolden/9ad9db2b9ba3299b33e3

    So far the only way I’ve been able to alleviate the issue is by adding the edit_posts capability, but this opens up the comments and posts sections for editing. Looking for some guidance. Thanks!

    Edit: formatting

    #98722
    Casey
    Participant

    integrity,
    Thanks for getting in touch. Not sure what’s going on with your plugin, but when I edit the ‘Contributor’ role and give it these capabilities, then I’m able to login as that user and edit events. Have you tried using a third-party plugin for managing roles? My personal favorite is Members. You might try using something like that instead of a custom plugin, and see if that fixes things.

    Thanks! 🙂

    -Casey-

    #98769
    integrity
    Participant

    Casey,

    Thank you for the recommendation of the Members plugin. I have been using it to debug this issue already.

    When I test the exact set of capabilities that you supply in that screenshot it doesn’t solve my issue of not being able to create venues or organizers. I tried updating the permissions in the plugin and I tried using the Members plugin to create a new role with those permissions.

    My problem is not with the ability for the user to create an event – that worked fine before. My problem is that the user can create an event but cannot create venues or organizers.

    #98779
    Casey
    Participant

    integrity,
    There must be something else that’s conflicting with this role’s capabilities, because I’m able to add Venues/Organizers with the permissions I showed you (screenshot). Have you tried deactivating your other plugins to see if there’s a conflict somewhere? Thanks! 🙂

    -Casey-

    #98812
    integrity
    Participant

    Casey,

    I created a separate fresh WordPress install with nothing but the Members plugin and The Events Calendar. I created a new role and assigned the permissions from the screen shot. I still receive the permissions error.

    There are no other active plugins and the theme is the Twenty Fourteen theme bundled with 3.8.1.

    #98814
    Casey
    Participant

    Hmmm, that’s strange. The only difference I can see is that I modified the ‘Contributor’ role instead of creating a new role. Try doing that and see if it makes a difference. Thanks! 🙂

    -Casey-

    #98816
    integrity
    Participant

    Casey,

    I actually did that before you replied – still no luck.

    The only way I can make organizers or venues editable is by adding the edit_posts capability.

    #100736
    Casey
    Participant

    integrity,
    Sorry, I didn’t reply sooner! I must have missed your reply somehow. What theme are you using on your fresh WordPress install? That’s the only other thing I could think that might be interfering with your roles.

    #103740
    Casey
    Participant

    integrity,
    Are you still having issues here? Just let me know and I’d be glad to help out. Otherwise, I’ll go ahead and close out this thread. Thanks! 🙂

    -Casey-

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Custom role cannot edit Venues or Organizers without edit_posts’ is closed to new replies.