Home › Forums › Calendar Products › Events Calendar PRO › Custom role cannot edit Venues or Organizers without edit_posts
- This topic has 8 replies, 2 voices, and was last updated 12 years, 2 months ago by
Casey.
-
AuthorPosts
-
January 29, 2014 at 2:48 pm #98465
integrity
ParticipantI’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/9ad9db2b9ba3299b33e3So 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
January 30, 2014 at 7:51 am #98722Casey
Participantintegrity,
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-
January 30, 2014 at 8:38 am #98769integrity
ParticipantCasey,
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.
January 30, 2014 at 8:45 am #98779Casey
Participantintegrity,
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-
January 30, 2014 at 9:48 am #98812integrity
ParticipantCasey,
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.
January 30, 2014 at 9:50 am #98814Casey
ParticipantHmmm, 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-
January 30, 2014 at 9:54 am #98816integrity
ParticipantCasey,
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.
February 4, 2014 at 2:18 pm #100736Casey
Participantintegrity,
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.February 12, 2014 at 7:11 am #103740Casey
Participantintegrity,
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-
-
AuthorPosts
- The topic ‘Custom role cannot edit Venues or Organizers without edit_posts’ is closed to new replies.
