BuddyPress 2.7.0 Beta 1 is now Available

BuddyPress 2.7.0 Beta 1

BuddyPress 2.7.0 is scheduled to be released on October 12, 2016.

#2-7, #beta

Group queries have been rewritten for BP 2.7

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 groups_get_groups() and BP_Groups_Group::get(), should be 100% backward compatible. Plugins that use the bp_groups_get_total_groups_sql or 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 SELECT id
  • The callback requires access to the groupmeta tables that were previously joined for ‘last_activity’ and ‘total_member_count’ (gm1 and gm2). These tables are now only JOINed during the main query when required by the type or orderby parameter. Access to the last_activity and total_member_count properties of group objects is unchanged.
  • The callback expects the second parameter – the $sql array – to have a specific format. Previously, the $sql array 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 $sql array 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 $r array 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 BP_Groups_Group objects.

Questions about the new query format, or how to make your plugin compatible with BP 2.7? Please leave comments in this thread.

#2-7, #groups

Dev Chat Summary for September 14, 2016

BuddyPress 2.7

  • Beta 1 – September 21
  • There are currently 110 tickets in queue (76 closed, 34 open)

Trac Tickets

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).”

Groups query overhaul (#5451) @boonebgorges will be posting about backward compatibility issues related to the group query refactoring.

Use WP 4.3 site icon feature to set a blog’s “profile photo” (#6544) @rayisme has patch which mirrors the site icon URL to blogmeta instead of making a direct copy of the image.

Update BP_buttons class to accept new arg param for $element_type (#7226) @rayisme has patch and requested feedback on the new, proposed class `BP_Core_HTML_Element`.

Improve group management members screen (#7105) @dcavins will be working on the changes this week.

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

#dev-chat

Dev Chat Summary for September 7, 2016

BuddyPress 2.7

Trac Tickets

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.

Friends: Add caching to BP_Friends_Friendship class (#6978) @dcavins has refreshed patch which caches friendship objects separately from a users’ friendships.

Change bp_sort_by_key() to allow key preservation (#7238) @dcavins has patch, “If anyone has reservations about changing the underlying function call, please add a note on the ticket.”

Add action hook(s) outside the group admin form (#7249) @dcavins has patch. @boonebgorges, “seems fine to me.” @tw2113 “is fine to me too, it has its docs.”😀 Update: This has been committed to trunk

No group members search in groupname/admin/manage-members/ (#6385) @dcavins has patch. Dev feedback needed.

Improve group management members screen (#7105) @dcavins has patch. @boonebgorges has posted comment in ticket. Update: This has been committed to trunk

Update BP_buttons class to accept new arg param for $element_type (#7226) @r-a-y requested feedback for current patch.

Group type frontend integration (#7210) @rayisme noted in ticket that he was going to commit patch soon. This has @boonebgorges‘ ♥ stamp.

Only load component action and screen code when we’re on the component’s page (#7218) @rayisme has patch. Dev feedback requested for relocating functions.

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.”

Use WP page names for BP directory pages headings (#6765) @hnla requested dev feedback. @boonebgorges will look into this.

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.

Creation of developer.buddypress.org (#6812) @tw2113 has set up test site at https://trexthepirate.com/buddypress/

Slack log: https://wordpress.slack.com/archives/buddypress/p1473274934000113

#dev-chat

Dev Chat Summary for August 31, 2016

BuddyPress 2.7

Trac Tickets

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.

Select All link missing in BuddyPress Menu Selection (#5260) @tw2113 has committed patch to trunk.

Extract & relocate core markup functions: Theme compat include functionality & search forms file (#6844) @boonebgorges has committed this 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.

Screen notifications settings page (#6712) @rayisme has patch. Dev feedback welcome.

Date xprofile field enhancement (#5500) @boonebgorges has updated patch. This ticket “is mostly done – just working out a couple of UI and acccessibilty issues near the end.”

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

#dev-chat

Dev Chat Summary for August 25, 2016

Trac Tickets

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.

Extract & relocate core markup functions: Theme compat include functionality & search forms file (#6844) Feedback sought. @boonebgorges has assigned it to himself for review.

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.”

Fatal error – Call to undefined function wp_generate_password() in bp-core\bp-core-options.php on line 77 (#7227) @rayisme has patch. Dev feedback needed.

@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.”

BuddyPress 2.7

  • 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).

#dev-chat

Dev Chat Summaries as of August 17, 2016

This is a compilation of our dev chats for Aug. 3, Aug. 10, and Aug. 17. Thanks for your patience🙂

BuddyPress 2.6.2

@dcavins packaged and released BuddyPress 2.6.2 last August 4, 2016. This was a maintenance release.

BuddyPress 2.7

  • 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).

Trac Tickets

  • Hierarchical groups (#3961) @dcavins had a patch which added the parent_id column to the groups database and support for querying by parent_id via 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.

Notes

  • @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 Awaiting Review and Under Consideration milestones 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.”

#dev-chat