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??
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.
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.
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.
PS The edit comes from the theme, and applies to the original topic not the replies.
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
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?
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.
Weird. Problem still persisting when I just now deactivated all plugins and activated Twenty Ten theme.
Now here are some interesting things though:
- 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.
- I’ve set Edit in forum settings to 99999 minutes so that’s not the problem.
- 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.
◾
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.
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.
How are you hiding the forums from non logged in users
can you try disabling that and seeing if the edit comes back
Afraid I’ve already tried deactivating all plugins besides bbPress :\
ok, but with default theme twenty fifteen, the user set to participant, and just bbpress the edit will show, so something is affecting this.