Edit Link Not Appearing for Subscribers

Home Forums Calendar Products Community Events Edit Link Not Appearing for Subscribers

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27620
    Stephen
    Participant

    Hi Modern Tribers–

    I’m having a bit of trouble getting the community events edit or delete link to appear for logged-in subscribers. Here’s my setup (this is an intranet otherwise I’d give you access to take a gander):

    * Multisite install (3.4.1)
    * Calendar is setup as a separate blog
    * Basic calendar plugin plus community events running just on this blog
    * Checkboxes for enabling users to edit/delete their own posts is enabled
    * Using an ldap plugin (wpdirauth) to authenticate users, but tested with non-ldap subscriber user and get the same behavior.

    At first I thought it was because users weren’t actually being added to the site because it’s using an ldap plugin. I installed “Multisite User Management” (http://wordpress.org/extend/plugins/multisite-user-management/screenshots/) in order to automatically add users as subscribers, but it didn’t help. Even logging in as a local (non-ldap) subscriber doesn’t work.

    I’m at a bit of a loss at this point. I’ve seen a few other posts about a missing edit link, but all seem to be resolved without taking any specific action (at least that I can see).

    Any help would be greatly appreciated.

    Stephen

    #27623
    Stephen
    Participant

    Ok – a little further testing revealed something.

    If I change the default status of a post to be “draft” instead of published then the edit and delete links show up correctly. Seems that if events are set to be immediately published then the subscriber is no longer able to edit them.

    Is there a way to adjust the role? Something like:

    $role_object = get_role( ‘subscriber’ );
    $role->add_cap( ‘edit_published_events’ );
    $role->add_cap( ‘delete_published_events’ );

    WIth that being said, I’m hoping if we can do something like that that it doesn’t enable a subscriber to edit/delete any event (even ones they didn’t create).

    #27646
    Barry
    Member

    Hi Stephen – I believe the behaviour you are describing may be by design, otherwise a more complicated workflow would be necessary for moderation purposes.

    (Please also note I’ve moved this across to the community forum. I’ll let one of my colleagues more familiar with that plugin take things from here though.)

    #27650
    Stephen
    Participant

    Hi Barry–

    Thanks for moving the post to the correct forum. My apologies for sticking it in the wrong place.

    #27654
    Stephen
    Participant

    Ok, I think I have this figured out. I found the correct capabilities to add for subscribers to edit and delete their own events. As I mentioned, since this is for an intranet we’re not as concerned with the normal moderation process.

    Anyway, here’s the code if anyone else would like it:
    if( $blog_id == ’14’ ) {

    // get the role object
    $role_object = get_role( ‘subscriber’ );
    $role_object->add_cap( ‘edit_published_tribe_events’ );
    $role_object->add_cap( ‘delete_published_tribe_events’ );
    }

    The if statement is optional – I wanted to restrict it to a specific subsite.

    #27676
    Casey
    Participant

    Stephen,
    Glad you got everything sorted out! I’ll mark this one as closed, but just feel free to start a new thread if you have further issues. Thanks!

    #978119
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Edit Link Not Appearing for Subscribers’ is closed to new replies.