BuddyPress 2.7.0 is scheduled to be released on October 12, 2016.
BuddyPress 2.7 will introduce a number of major changes to the code that underlies group queries – specifically,
BP_Groups_Group::get(). Most of these changes will be invisible to users and developers, but anyone using filters to modify the underlying SQL may experience backward compatibility breaks in certain cases.
The main motivator for the changes is performance. Over the past few releases, BuddyPress has been following WordPress in moving its object queries to the “split” model, where one query gets the IDs matching the query parameters, and the second query gets the objects corresponding to the matched IDs. Split queries are generally less memory-intensive, and make it easier to phase in various improvements to caching. The changes we’ve made for BP 2.7 should lead to a huge performance improvement on sites using persistent caching; when querying groups, not only are group objects now fetched from the cache when available, but the ID queries themselves are cached as well. See 5451 for more information.
All normal uses of the
bp_has_groups() stack, including
BP_Groups_Group::get(), should be 100% backward compatible. Plugins that use the
bp_groups_get_paged_groups_sql filters may require an update for BP 2.7 compatibility. Filter callbacks will break in the following cases:
- The callback assumes the old comma-separated JOIN syntax:
SELECT ... FROM wp_bp_groups g, wp_bp_groups_groupmeta gm1 .... The SQL now uses the more verbose JOIN syntax:
SELECT ... FROM wp_bp_groups g JOIN wp_bp_groups_groupmeta gm ON ( g.id = gm.group_id ) ...
- The callback assumes
SELECT *instead of
- The callback requires access to the groupmeta tables that were previously joined for ‘last_activity’ and ‘total_member_count’ (
gm2). These tables are now only JOINed during the main query when required by the
orderbyparameter. Access to the
total_member_countproperties of group objects is unchanged.
- The callback expects the second parameter – the
$sqlarray – to have a specific format. Previously, the
$sqlarray had keys that corresponded to various WHERE conditions, but the array was assembled haphazardly, and some values were not included. Now, the top-level items in the
$sqlarray are the main clauses of the SQL query (‘select’, ‘from’, ‘where’, etc) and the WHERE conditions are grouped in the
$sql['where']key. If your plugin filters the SQL string conditionally – for example, when performing a search – you are encouraged to use the third parameter, the
$rarray of arguments passed to the query method, as the canonical source for query information.
In this comment, I outlined a list of plugins from GitHub and wordpress.org that may be affected by the change. If you see your name on that list, consider yourself pinged.
Though it shouldn’t result in any backward compatibility breaks (except in cases of odd type checking), it’s also worth noting that items returned from
BP_Groups_Group::get() are now
Questions about the new query format, or how to make your plugin compatible with BP 2.7? Please leave comments in this thread.
- Beta 1 – September 21
- There are currently 110 tickets in queue (76 closed, 34 open)
Prevent BP from being updated when minimum requirements are not met (#7196) @boonebgorges: “If we’re going to drop PHP 5.2 support for 2.8, then something should happen for 2.7 to provide warnings. I’m bumping this so I remember to look at it in the next few days. if anyone has thoughts or wants to have it instead, let me know on the ticket.”
Display and filter by member type on Dashboard > Users (#6060) @dcavins has patch. @boonebgorges: “This is a cool enhancement, and it’d be great to get it in, especially since it appears to be close to being ready.” @dcavins: “Yes, I’ll push this through along with the related group types ticket (#7175).”
Friends: Add caching to BP_Friends_Friendship class (#6978) @dcavins has patch. @boonebgorges: “It would be helpful to demonstrate the need (or lack thereof) by writing tests that count `$wpdb->num_queries` before and after removal. Maybe go ahead with the proposed changes first, and then worry about removing the redundant cache afterward when it’ll be simpler to write tests for.”
Slack log: https://wordpress.slack.com/archives/buddypress/p1473879643000745
- Beta 1 – September 21, 2016
- There are currently 108 tickets in queue (65 closed, 43 open).
Groups query overhaul (#5451) @boonebgorges has patch to boost performance and object caching for the Groups component. He noted, “There will be some backward compatibility breaks for anyone using `bp_groups_get_(paged|total)_groups_sql` filters and has listed some plugins in ticket. Dev feedback requested – especially @djpaulgibbs and @rayisme ( @dcavins has already voiced his support :) )” @rayisme has posted support as well. Update: This is now in trunk.
Hierarchical groups (#3961) @dcavins is ready to commit the patch which has a cache invalidation scheme. @boonebgorges said patch looks good and mentioned testing the patch with thousands of groups. @dcavins is prepared to test with a group generator via WP-CLI.
Update BP_buttons class to accept new arg param for $element_type (#7226) @r-a-y requested feedback for current patch.
Screen notifications settings page (#6712) @rayisme has patches for a separate screen notifications panel as well as for a new merged notifications (email and screen) panel. @dcavins likes the “idea of a central place to manage communication.” @boonebgorges “I haven’t tested the patch, but I definitely like the idea of a central place for managing this stuff. I’ll check it out. What to do with 3rd-party settings doesn’t seem like a dealbreaker either way.”
Display and filter by member type on Dashboard > Users (#6060) @dcavins has updated patch. Dev feedback requested – “a lookover would be great because this should easily apply to the groups wp-admin table with slight modification.” @boonebgorges will try to take a look.
Slack log: https://wordpress.slack.com/archives/buddypress/p1473274934000113
- Beta 1 – Sept. 21, 2016
- There are currently 98 tickets in queue (56 closed, 42 open).
BP-legacy: split group single admin.php in separate template files (#7079) @hnla has committed this to trunk. If you have copied over `groups/single/admin.php` and made some changes, there won’t be any changes to your theme. You might want to consider, however, “updating your file/s to the newer modular markup to enjoy improvements”, @dcavins said.
Improve `$args` included in `bp_current_user_can` and `bp_user_can` filters (#7192) @dcavins requested feedback from @rayisme who gave the nod. Update: @dcavins has committed patch to trunk.
Use WP page names for BP directory pages headings (#6765) @hnla, @imath, @boonebgorges, and @dcavins have contributed patches for this ticket and @rayisme has shared a code snippet. @hnla requested dev feedback.
strtotime() is evil don’t use it (#5781) @rayisme has committed patches for this ticket. He requests feedback on the `5781.mysql2date.patch`. “All of our `strtotime()` calls assume that GMT is the default timezone. If the server’s timezone is anything but GMT, then our time rendering is wrong. Almost all of BP’s timestamps are in GMT.” Dev feedback requested.
BP Types UI
@boonebgorges and @dcavins will be developing the new dashboard UI for creating Member Types and Group Types as a plugin first. @boonebgorges has created the new repo at https://github.com/buddypress/bp-types-ui
Slack log: https://wordpress.slack.com/archives/buddypress/p1472669906000142
Date xprofile field enhancement (#5500) @boonebgorges has patch and sought feedback for:
a) modeling settings data on BP_XProfile_Field and _Type — @djpaulgibbs “It would be nice to pass the data to it to handle, if possible, rather than have to touch a global.”
b) what do we think of interface for date ranges? — @djpaulgibbs “The UI is nice”. @rayisme “I’m trying to figure out the use case for relative ranges”. @mercime reported a bug.
Select All link missing in BuddyPress Menu Selection (#5260) Testing needed for this to be committed.
Implement user capabilities for Activity component (#7176) @djpaulgibbs “I’m hopeful someone can come in and drop a knowledge bomb” (roles and capabilities). @boonebgorges has added this ticket to his review list🙂 @rayisme informed us that he created WP trac ticket “that would probably make dynamic caps easier to implement – https://core.trac.wordpress.org/ticket/32316.”
@mentions break instagram oembeds if same username exists on site as instagram (#7084) @websupporter has dug deep into the Instagram issue and posted results of his research. Feedback requested.
Group type frontend integration (#7210) @rayisme has a second patch which includes some new parameters to bp_groups_register_group_type() and which will allow theme devs or site admins to show group types in front end. @boonebgorges “Just browsing the patch, but looks great at a glance. I like the params as a way of controlling the behavior.”
- September 21 – Beta 1
- October 5 – Release Candidate 1 (string freeze)
- October 12 – Target Release date
- There are currently 91 tickets in queue (47 closed, 44 open).
- September 21 – Beta 1
- October 5 – Release Candidate 1 (string freeze)
- October 12 – Target Release date
- There are currently 84 tickets in queue (44 closed, 40 open).
Hierarchical groups (#3961) @dcavins had a patch which added the
parent_idcolumn to the groups database and support for querying by
groups_get_group()and @rayisme has uploaded a new patch which includes cache invalidation, among others. Dev feedback requested.
- Group type frontend integration (#7210) @rayisme has patch which includes new UI. Dev feedback requested.
- Display and filter by member type on Dashboard > Users (#6060) @slaFFik has patch. Dev feedback requested.
- xprofile field support for WordPress Profile Fields (#7162) @djpaulgibbs: “We’ve not touched the xprofile sync code in years. So if anyone has any ideas about this … and what a new implementation should work like, please comment on the ticket.” He might work on this for BP 2.8.
- Only load component action and screen code when we’re on the component’s page (#7218) @rayisme has patch for the activity component.
- Select All link missing in BuddyPress Menu Selection (#5260) @tw2113 has patch and ready to commit. Review and testing requested.
- BP-legacy: split group single admin.php in separate template files (#7079) Patches by @offereins, @hnla, and @rayisme. Dev feedback requested.
Date xprofile field enhancement (#5500) @boonebgorges has patch which includes new UI. Dev feedback welcome.
Related: @djpaulgibbs has been talking to Miguel from the https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/ plugin about porting some of that plugin’s field types into core. Tickets will be created when ready.
- Implement user capabilities for Activity component (#7176) @djapulgibbs has patch. Needs feedback from anyone who knows roles/caps API well.
- Screen notifications settings page (#6712) @rayisme is working on this ticket. Related to Central place to manage all notifications and delivery preferences (#7168). Needs wireframes. @mercime has volunteered.
- Extract & relocate core markup functions: Theme compat include functionality & search forms file (#6844) @hnla has patch. Dev feedback requested. @boonebgorges has agreed to review patch.
- Member/Group Type management in wp-admin @boonebgorges: “If my schedule loosens up in the next few weeks, I will make a first go at a first patch “
- Accessibility Tickets. @mercime – Goal is to make our front-end templates and at least 85% of BP admin screens accessible-ready by 2.7 launch. There are some style issues for the headings at this time, but will resolve them before deadline.
@djpaulgibbs: “I’m always available for code review and playing the devil’s advocate in feature discussions.
I would also like to remind regular contributors they are very welcome to leave feedback on tickets in
Under Considerationmilestones on Trac. There’s a backlog, and we really need to do better here. So if anyone wants a change from forum support or development or translation, check out Trac.”