Skip to:
Content
Pages
Categories
Search
Top
Bottom

Participants aren't able to edit their own topics


  • Martyn Chamberlin
    Participant

    @martyn-chamberlin

    Hi,

    When a user creates an account at http://thewritepractice.com/index.php?/register/JUZsw5 and then goes to the bbPress forum at http://thewritepractice.com/bw and posts a topic, there is an Edit link at the bottom of that topic. But when they click that link, they get this error message:

    You are not allowed to edit this item.

    A few notes:

    1. I’m on the latest version of WordPress.
    2. This problem persists when all plugins but bbPress is activated.
    3. This problem persists when the 2015 theme is activated.

    I installed and activated the bbPress Advanced Capabilities plugin and learned that if I enabled “Edit others topics” for Participants, the participant could then edit their topic.

    So in other words, bbPress thinks that the topic is being created by someone other than themselves.

    Any ideas how this could be the case? It’s very strange…

    Thanks!

Viewing 16 replies - 1 through 16 (of 16 total)

  • Martyn Chamberlin
    Participant

    @martyn-chamberlin

    Wow. Here’s a quick followup: after submitting this bbPress topic, I see a green Edit link at the bottom of this screen (https://bbpress.org/forums/topic/participants-arent-able-to-edit-their-own-topics/). When I click it, I get the exact same error message:

    You are not allowed to edit this item.

    This is feeling like a global bbPress problem.

    What’s going on here??


    Robin W
    Moderator

    @robin-w

    Just shows how much we don’t play with – I’ve never hit that link.

    By the way I’m not part of the plugin team, just a humble user !

    But after a bit of testing, for a topic called Test Topic :

    Within the post you’ll see an edit which takes you to

    http://www.mysite.com/forums/topic/test-topic/edit/

    which allows a user to edit

    But the EDIT link at the bottom goes to

    http://www.mysite.com/wp-admin/post.php?post=18358&action=edit

    which is a wordpress supplied link, which a user isn’t allowed to edit as it is a backend function, unless they have privilege to access topics on the backend which only moderators and keymasters can do.

    So participants see this link which they can’t use !!

    Well spotted – I’ll take a look when I get a moment at whether this can be switched off in wordpress for bbpress pages, or the link changed.


    Martyn Chamberlin
    Participant

    @martyn-chamberlin

    Wow. Crazy that nobody has ever tried to use that feature before!

    Here’s the interesting thing though. WordPress.org’s support forum is (I’m 99% sure) built in bbPress and it does successfully allow you to edit topics that you’ve posted. The interface you are sent to when editing your topic does not reside inside the WordPress admin area. Rather it is right there on the publicly facing page.

    I wonder how they are doing that?

    Another interesting wrinkle in this whole thing is that according to the bbPress User Roles and Capabilities, participants should be able to edit their own topics.


    Robin W
    Moderator

    @robin-w

    Crazy that nobody has ever tried to use that feature before!

    I expect lots have, but as it works for mods and above and site developers/admins tend to be at that level, then it would work.

    … Participants should be able to edit their own topics.

    Absolutely they should, and they can via the edit in the topic box.

    As I said I’ll take a look at a filter to fix.


    Robin W
    Moderator

    @robin-w

    PS The edit comes from the theme, and applies to the original topic not the replies.


    Robin W
    Moderator

    @robin-w

    ok, the following code removes the edit for bbpress, but leaves it for normal wordpress pages

    function wpse_remove_edit_post_link( $link ) {
    	if (is_bbpress()) return '' ;
    	else return $link ;
    	}
    add_filter('edit_post_link', 'wpse_remove_edit_post_link');
    

    The users will still be able to edit their topics and replies via the in-box edit buttons


    Martyn Chamberlin
    Participant

    @martyn-chamberlin

    Hi Robin,

    Okay, I’m just now realizing that we have two problems going on here then.

    1. Problem #1 was a universal to bbPress problem, and your code above fixes that.

    2. Problem #2 is the fact that at http://thewritepractice.com/bw, the forum does not realize that you are the author of the topic you’re posting. There is no Edit button in the in-box area. Only when I enable “Edit others topics” for Participants via the bbPress Advanced Capabilities plugin do you then see the Edit link in the in-box area.

    Any ideas on how we can fix this problem, and what might be causing it?


    Robin W
    Moderator

    @robin-w

    ok, it’s back to looking at this aspect specifically.

    1. some themes only show the edit when you hover in the topic/reply content, this is theme specific not bbpress.

    2. I know you have already tested the below but please try again as bbpress is tested with default themes. Try twentyten as I know it gives a firm edit box :

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    Then come back.


    Martyn Chamberlin
    Participant

    @martyn-chamberlin

    Weird. Problem still persisting when I just now deactivated all plugins and activated Twenty Ten theme.

    Now here are some interesting things though:

    1. When viewing http://thewritepractice.com/topic/test/ as admin, the Edit link is there in the box. When viewing it as the author of it however, not seeing Edit.
    2. I’ve set Edit in forum settings to 99999 minutes so that’s not the problem.
    3. Also, when logged in as author of the topic, I can load http://thewritepractice.com/topic/test/edit/ just fine and edit the topic. So it does recognize me as the author on the edit screen, but somehow not on the actual “view topic” screen.

    Because of this last observation, I conjecture that we must be using different logic for “is the current user the author of this topic” on the View versus on the Edit screen.

    Really appreciate your help on this.


    Robin W
    Moderator

    @robin-w

    When viewing http://thewritepractice.com/topic/test/ as admin, the Edit link is there in the box. When viewing it as the author of it however, not seeing Edit.

    The above are wordpress roles (and useful info) but can you tell me what bbpress roles you have set for this user.


    Martyn Chamberlin
    Participant

    @martyn-chamberlin

    WP role is subscriber and the bbPress role is Participant.

    Above I’m using “author” in the generic sense of being the person who generated the content.


    Robin W
    Moderator

    @robin-w

    How are you hiding the forums from non logged in users


    Martyn Chamberlin
    Participant

    @martyn-chamberlin

    Through Wishlist Member.


    Robin W
    Moderator

    @robin-w

    can you try disabling that and seeing if the edit comes back


    Martyn Chamberlin
    Participant

    @martyn-chamberlin

    Afraid I’ve already tried deactivating all plugins besides bbPress :\


    Robin W
    Moderator

    @robin-w

    ok, but with default theme twenty fifteen, the user set to participant, and just bbpress the edit will show, so something is affecting this.

Viewing 16 replies - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.
Skip to toolbar