latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

FAO Jason Potential BUG with BBPress 2.2+

Home Forums Community Forum FAO Jason Potential BUG with BBPress 2.2+

This topic contains 9 replies, has 3 voices. Last updated by  RossGrant 3 years, 9 months ago.

Topic Author Topic
Posted: Wednesday Mar 6th, 2013 at 12:45 pm #43887
Username: RossGrant


Hey guys!

I think this might be one for Jason – and how the code for S2Member changed the way BBPress caps are now used in S2 after BBPress 2.2+ started dynamically assigning roles.

I have just come to edit some topic tags from the backend of my site, but was very surprised to see that the option which should display under

Topics > Topic Tags was not there.

Now bizarrely I can access the topic tags page by using the direct slug which should be /wp-admin/edit-tags.php?taxonomy=topic-tag&post_type=topic

So the page exists, I’m just not seeing the flyout menu option for it.

For that reason it has to be a caps issue, and the ONLY thing that I can think of that might alter caps is s2Member.

Now what is a bit weird is that when I deactivate S@ member, the issue REMAINS, which would suggest that a permanent change to the user caps has been made somewhere.

I’ve NEVER used any plugins other then BBPress that did this.

I think BBPress 2.0 and 2.1 DID alter these caps permanenlty, and that’s why in 2.2+ they did away with that method to role with dynamic roles to avoid problems, so it COULD be something gummed up from an older version of BBPress I guess.

My question is does S2 alter caps permanently and could this issue be caused by that happening.

The ‘bbp_topic_tags_admin’ cap is mapped to the ‘moderate’ cap, which means a user needs to be a Moderator or higher to see the UI.

That happens in: bbp_map_topic_tag_meta_caps()

Does S2 follow this rule and is that why the UI for the topic tags might not be showing.

I’m not too clued up on it, but would love a little help if possible.

As always, thanks so much guys!

PS, it’s not a different plugin issue as this happens if I deactivate EVERYTHING and switch to BP-Default.

Ross :)

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Wednesday Mar 6th, 2013 at 1:22 pm #43895
Username: RossGrant

Okay Jason, this is definitely an S2 issue from what I can gather in testing.

I’ve found another crazy quirk too.

Here’s how you replicate it:

– Log in as admin
– Go and deactivate S2 Member
– Try and access /wp-admin/index.php

I get a permission denied, like it no longer gives me all admin caps.

I can access plugins again to reinstate s2member and it gives me access to the admin index page again, but without S2 being on I don’t get it.

I have noticed that even without S2 active that the user roles for S2 levels still show up in the backend of user profiles so S2 is leaving behind caps.

The initial issue with no access to topic tags must be due to the way S2 plugs into BBPress.

It’s not hooking into the levels above moderator somehow so we don’t see the UI for the Topics> Topic Tags menu.

Would love to hear if you can recreate this.

Like I say though, the installations I’m using have had BBPress installed since version 2.0, so there could be things left over from previous versions.

Ideally it would be great to reset all caps I guess?

Ross :)

Posted: Wednesday Mar 6th, 2013 at 1:34 pm #43898
Username: RossGrant

Update 3.

This doesn’t seem to be an issue on a new S2 install on a new BBPress install.

Some existing caps must be left from earlier BBPress versions that are screwing things up here unfortunately!

Any idea how we could tackle this Jason?

Any way to reset user roles at all and sync them again with S2 member?

I’m guessing there are going to be many folk in the same boat who have used bPress for a while.

Posted: Wednesday Mar 6th, 2013 at 6:18 pm #43910
Username: RossGrant


Okay, i see that this issue has been reported before here:

Yep, it is 100% due to upgrading BBPress from version 2.0 – 2.1 – 2.2.x

So to clarify, BEFORE I decide to reset all user capabilities then reactivate all plugins, I’m not going to lose any S2 data for users am I?

I’ll just be resetting the caps?

I guess you only have one shot at this, I’d like to be totally clear on each step before I take this plunge!

Ross :)

Posted: Wednesday Mar 6th, 2013 at 8:25 pm #43918
Username: RossGrant

Okay, I think FINALLY I have worked this out!

IGNORE EVERYTHING above more or less, here is what is happening.

‘Read’ is a core WordPress Capability, which by default is set to ‘on’ for many (if not all) WP roles.

Installing BBPress (current version 2.2.4) doesn’t alter that role on initial activation or subsequent deactivations WHEN S2 is NOT activated.

HOWEVER upon deactivation, through upgrade or manually WITH S2 Member ACTIVE, for some reason the ‘Read’ cap is deleted from subscriber, admin and S2 roles 1 – 4.

This won’t cause an issue UNTIL YOU DEACTIVATE S2, when you’ll start having issues with admin menus due to you no longer having the ‘Read’ cap.

The issue that I was having with no access to the ‘Topic Tags’ menu isn’t related I don’t think.

I think this was actually to do with BBPress NOT assigning the keymaster role to admin when upgrading from previous versions of BBPress.

It does this by default now in new versions, but i think for those that have upgraded from previous versions in the past that it wasn’t doing this.

From what I can tell, the best thing to do is to install the ‘Capability Manager Enhanced’ plugin, detailed by Jason in the link above.

Deactivate all plugins except the capability plugin.

Reset all WP roles.

Then activate all plugins again to run the new capabilities needed.

If you are upgrading BBPress after that you must turn off S2 temporarily, upgrade BBPress, then turn S2 on again.

I’m going to keep poking about, but that’s what i’m getting so far.

What do you think Jason, is this an S2 issue then?

*** To assign the Keymaster role to all admins, you will need to create an extra admin account, install the ‘Switch User Plugin’, switch to the new admin, access your original admin edit screen when logged in as the new admin, and assign the keymaster role to your initial admin account.

Posted: Friday Mar 8th, 2013 at 12:43 pm #44092

Thanks for your updates, Ross. I’ll forward this to Jason.

bbPress started messing with WP roles/capabilities in a silly way recently, and s2Member had to cope with that. Jason added a button to help with this, have you tried it? [hilite path]Dashboard -› s2Member® -› Other Integrations -› bbPress® -> Update Roles/Capabilities[/hilite]

Posted: Friday Mar 8th, 2013 at 8:53 pm #44133
Username: RossGrant

Hey Cristian,

Yep, I’v elooked at the new button in the ‘Other Integrations’ section as well as the roles button found in the general settings menu.

The issue isn’t with the integration this time, it’s purely a capability issue when you deactivate BBPress WITH S2 Member BEING ACTIVE.

It’s really bizarre, but if you do that, the ‘Read’ capability is stripped from the roles of admin and S2 levels 1-4 (perhaps others too).

This means that if you eventually deactivate S2 then the admin will have issues accessing a fair few screens and UI’s in the backend, until you reinstate the ‘read’ cap.

Deactivating BBPress when s2 is NOT active does not remove the cap, so some conflict with S2 is causing this somewhere.

It’s all a little odd.

Posted: Friday Mar 8th, 2013 at 11:53 pm #44136

Thanks for clarifying that. I’ll wait for Jason. :)

Posted: Friday Mar 15th, 2013 at 10:49 am #44708
Staff Member

Thanks for the heads up on this thread :-)

This issue has been identified and will be corrected in the next maintenance release. Until then, I’m attaching a PATCH file. Please unzip and upload the attached file, allowing it override your existing copy of /s2member/includes/classes/

The underlying cause was not really that s2Member® was removing any caps, but that it was filtering the list of caps that bbPress uses; thereby causing an indirect removal of the read, level_0 and access_s2member_level[0-9]+ caps whenever bbPress was uninstalling and/or deactivating itself.

Thanks for reporting this Ross!

Posted: Friday Mar 15th, 2013 at 9:47 pm #44874
Username: RossGrant

Once again, thanks for being so darn good everyone!

Really glad we could fix this.

Look forward to the next release!

Ross :)

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.