Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

#7247 closed defect (bug) (fixed)

Groups calls WP's "loop_start", causing compatibility issues with other plugins.

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile DJPaul
Milestone: 2.7 Priority: normal
Severity: normal Version: 1.0
Component: Core Keywords:
Cc:

Description

Via https://wordpress.org/support/topic/buddypress-incompatibility/, the plugin https://wordpress.org/plugins/beautiful-taxonomy-filters/ hooks into loop_start and makes an assumption that the argument passed is an instance of wp_query.

In our BP_Groups_Group_Members_Template and BP_Groups_Invite_Template classes, however, we also call the same action, and because we obv. don't pass it a wp_query object, we cause a fatal error. This dates back to 1.0 and 1.1.

All of our other loops have our own-named actions in these template loop start locations, I think we should rename these actions and suffer the potential backwards compatibility break.

Change History (3)

#2 @DJPaul
8 years ago

  • Owner set to DJPaul
  • Status changed from new to assigned

#3 @djpaul
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 11083:

Groups: rename loop_start and loop_end actions.

This gives the Group Invitations and Group Members loops unique names for the actions called at the start and end of those templating loops. These are analagous to WordPress' Post templating loop with loop_start and loop_end, which is where the action names were likely copied from originally.

This has caused compatibility problems with plugins that hook to these actions that rightly expect the type of the first passed argument to be of WP_Query.

Fixes #7247

Props herbovec for reporting the issue.

Note: See TracTickets for help on using tickets.