[buddypress-trac] [BuddyPress Trac] #8558: Adapt Group extensions registration to BP Rewrites

buddypress-trac noreply at wordpress.org
Wed Dec 22 18:22:36 UTC 2021


#8558: Adapt Group extensions registration to BP Rewrites
--------------------------+-----------------------
 Reporter:  imath         |       Owner:  imath
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  10.0.0
Component:  Groups        |     Version:  1.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------
Changes (by dcavins):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I've uncovered an issue with this that seems to only "keep" the last group
 extension registered. I will a test plugin that exposes the problem. If BP
 is working, when you visit a group, you should see three new tabs: "New
 Tab" "New Tab 2" and "New Tab 3." If BP is broken, you'll only see "New
 Tab 3." I've also attached a patch that appears to resolve the issue by
 **not passing the new class by reference** in
 `bp_init_group_extensions()`. I don't really understand why passing by
 reference seems to cause issues here when it didn't in the function's
 previous context. So I'll ask @imath and @boonebgorges to weigh in if they
 understand the issue.

 I've attempted to write a test to check this behavior, but I can't quite
 figure out how to directly test `bp_register_group_extension()`.

 Thanks for your feedback!

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8558#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list