Bug #25864
openUpdate bbPress to 2.6.19
0%
Description
I'll be skipping the available bbPress update during the upcoming maintenance release. Instead, after the CAC 2.7.13 release, I'll update bbPress to 2.6.19, reapply our customizations, and then load it onto CDEV for testing.
A few reference items:
- bbPress release posts for 2.6.18 https://bbpress.org/blog/2026/09/bbpress-2-6-18-is-out/ and 2.6.19 https://bbpress.org/blog/2026/09/bbpress-2-6-19-is-out/
- bbPress codex pages for 2.6.18 https://codex.bbpress.org/releases/bbpress-2-6-18/ and 2.6.19 https://codex.bbpress.org/releases/bbpress-2-6-19/
- Changelogs from readme https://github.com/bbpress/bbPress/blob/2.6/CHANGELOG.md#2619---2026-09-29
I've attached a diff between the release version of bbPress 2.6.17 and what we run on the Commons. This'll be a baseline for applying our customizations.
I'll update this ticket when we're ready to have a look.
Files
Updated by Boone Gorges about 1 month ago
- File cac-bbpress-2.6.17.diff cac-bbpress-2.6.17.diff added
During today's 2.7.13 release, I noticed that there were some uncommitted changes to bbPress running in production. I committed them in https://github.com/cuny-academic-commons/cac/commit/462e7bc60adc8cfd40ea405ddb6fbbfd04607db0. Based on these, I generated a new diff between what we run on the Commons and what's in bbPress 2.6.17 - see attached.
Momentarily I'll try to merge everything for bbPress 2.6.19 and get it in place for testing.
Updated by Raymond Hoh about 1 month ago
Apologies for leaving production with uncommitted changes, Boone.
I think commit 462e7bc isn't necessary since I've worked around those core bbPress mods in the following commits:- https://github.com/cuny-academic-commons/cac/commit/bb4b5aa3dc306b6c2929083ef71d0ae210d62a03
- https://github.com/cuny-academic-commons/cac/commit/77268fc2d403d0afab216b95510e647da95b0684
- https://github.com/cuny-academic-commons/cac/commit/527a3ac800e0b63258b0f4affa1508bf2b2b3f82. Regarding this fix, please take a look at what I mentioned here -- https://redmine.gc.cuny.edu/issues/25718#note-17 -- to see if the logic is sound. I opted to always check all available post statuses for the
'forum'post that is connected to a group, but we could restrict the 'private' or 'hidden' post status check only if the group is private or hidden.
I did leave production uncommitted because commit 462e7bc included changes to the 'participate' to 'exist' caps, which I didn't make and wasn't sure if you were still doing some debugging with that.
To be clear, the original cac-bbpress-2.6.17.diff is still needed for 2.6.19, but the upcoming bbPress 2.6.20 might not need it as JJJ has made some adjustments here. We will need to test to be sure though.
Updated by Boone Gorges 30 days ago
Thanks, Ray. No apologies necessary - obviously I left things a mess myself with my 'exist' tests.
Regarding those unstaged changes, I understand how I can discard the bbp_include_all_forums part (and I think that your workaround in https://github.com/cuny-academic-commons/cac/commit/527a3ac800e0b63258b0f4affa1508bf2b2b3f82 is a fine fix for this), and I understand that I can get rid of the participate/exist checks. But what about the super-sticky stuff? That's covered by https://github.com/cuny-academic-commons/cac/commit/77268fc2d403d0afab216b95510e647da95b0684?
It appears that John has cleared out the 2.6.20 milestone, and it looks like it includes extensive changes https://bbpress.trac.wordpress.org/query?milestone=2.6.20&status=accepted&status=assigned&status=closed&status=new&status=reopened&status=reviewing&order=priority&col=id&col=summary&col=status&col=milestone&col=owner&col=type&col=priority Like you said, we're going to have to spend energy to test and merge our customizations when 2.6.20 is released, so perhaps we should just skip the 2.6.19 upgrade for the time being, in case that release is imminent. Let's hold off here and circle back in a week to see where things stand.
Updated by Raymond Hoh 24 days ago
But what about the super-sticky stuff? That's covered by https://github.com/cuny-academic-commons/cac/commit/77268fc2d403d0afab216b95510e647da95b0684?
Right, so the rationale here is we should only be querying for private and hidden forum IDs if super stickies are requested since we do not want private super-stickies to be visible. The super-sticky stuff is an edge case anyway because we do not even use super-sticky threads on the Commons.
Commit 77268fc is basically the non-core hack for https://github.com/cuny-academic-commons/cac/commit/c37a78925c77b47ed184b02eaba954f7b8e48ece#diff-5a93bb033ee9df1113ad7df1fba496977ad0c458af6f3e4311bff718f32280e0
It appears that John has cleared out the 2.6.20 milestone, and it looks like it includes extensive changes
bbPress 2.6.20 was released on October 15th, so we should just go ahead and use 2.6.20 for testing. Looks like the upcoming 2.6.21 fixes a bunch of regressions, so we should hold off until 2.6.21.
There will probably be many things to test, but one main change to look out for is the one that covers activity filtering: https://github.com/bbpress/bbPress/commit/8c087ec3439ca4cdc22e95bb8dd7cdc8f2751289.
Updated by Boone Gorges 24 days ago
Looks like the upcoming 2.6.21 fixes a bunch of regressions, so we should hold off until 2.6.21.
Good catch. I'll check every few days for the 2.6.21 release so that we can get started.
Updated by Boone Gorges 17 days ago
- Target version changed from 2.7.14 to 2.7.16
No bbPress 2.6.21 update yet, so let's hold off on the current ticket.
Updated by Boone Gorges 2 days ago
bbPress 2.6.21 was released last week, and I've spent a bunch of time over the last day trying to sort things out.
At least some portions of our bbPress hotfixes will no longer be needed after the 2.6.21 upgrade, as they, or some version of them, have been merged into bbPress itself. I'll have more on those in a later post.
Some of the ongoing issues with our use of bbPress, including the problems we have with over-aggressive tree traversal and crawling as were introduced in bbPress 2.6.17, are exacerbated by the fact that we have a goofy legacy setup for our group forums. There's a single forum, 11540, that serves as the parent forum for all of our group forums. This group is called 'Help' and has the 'private' post_status. The forum's metadata says it belongs to group 465, which is cac-community-team-project-planning:
$ wp post meta list 11540 | grep group
11540 _bbp_group_ids a:1:{i:0;i:465;}
But this is obviously not the case from the group's point of view (the group has an actively used forum):
$ wp bp group meta list 465 | grep forum
465 forum_id a:1:{i:0;i:11946;}
So it's a private, orphaned forum. This mostly didn't matter over the years. But the bbPress 2.6.19 security release added additional tree-building in the names of keeping private stuff private, and the fact that our group-forum-root is private means that additional traversal is necessary. This appears to be made worse by the 2.6.21 release, because additional traversal is needed for the protection of BP activity items, which touches many views on the site. This is not only about performance: as things stand, the private root forum means that, once we update to bbPress 2.6.21, even public group forum activity will not appear in activity streams, at least not without further modification.
As such, I'm going to propose that we take this opportunity to unravel the mess somewhat, by making the group-forum parent public rather than private. This will require some remediation of existing content, since it's likely that the privacy of some existing forum content on the site is enforced only by the privacy of the group-forum-root parent. The "regular" case of private forums attached to private groups would continue to be OK. But cases where the parent group has been deleted and the forum is orphaned, or cases where the parent group switched its forum and abandoned the old forum, or cases where certain topics belong to the group-forum-root for whatever reason - in all these cases we'll need to do fix some underlying data (either by trashing old dummy content or hiding it, as necessary). I have done some initial work on this, which I'll share in a follow-up post.
This alone will not solve the problems that bbPress 2.6.21 introduces, specifically regarding the enormous overhead of tree-building. We can mitigate much of this by improving caching and cache-warming. I've also begun working on this and will share more in an upcoming post.
In the shorter run, my initial analysis showed that our existing cap-granting workarounds, which we have introduced since the bbPress 2.6.17 upgrade (see esp #25718), actually introduce some privacy bugs of their own. Specifically:
- The fact that we grant forum-related caps when looking at a BP group with
openlab_bbp_map_group_forum_meta_caps() introduces the possibility of cross-group forum data being leaked. This is largely theoretical because our theme generally doesn't display content from other groups when looking at a group interface.
- The fact thatopenlab_bbp_map_group_forum_meta_caps() operates on 'read_hidden_forums' and 'read_private_forums' means that it could grant caps to read content from forums linked to groups with which the user is not connected. This too is theoretical because it's not really exposed in the interface in an obvious way.I'm going to ship a fix for these security issues in today's 2.7.15 release: https://github.com/cuny-academic-commons/cac/commit/2d29af77cf269893f41e8d1926ef9a3c3f733d4b Briefly, I do two things: (a) Stop granting the unnecessary "private" caps that are overbroad, and (b) verify that the cap being granted is linked to the correct group, to avoid group-hopping.
On these other items, I'll have more in the upcoming days with a plan.