[buddypress-trac] [BuddyPress Trac] #9089: Only run 'bp_parse_query' hook once during AJAX

buddypress-trac noreply at wordpress.org
Thu Feb 8 23:47:50 UTC 2024


#9089: Only run 'bp_parse_query' hook once during AJAX
--------------------------+---------------------
 Reporter:  r-a-y         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  12.3.0
Component:  Core          |     Version:  12.0.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+---------------------
Description changed by r-a-y:

Old description:

> Ran into an issue in BuddyPress 12 where the `'bp_parse_query'` hook was
> running more than once during AJAX requests.
>
> The issue is in the `bp_parse_ajax_referer_query()` function. If another
> piece of code runs a `WP_Query` on a BuddyPress AJAX action, then the
> `'parse_query' hook will run, which would lead to the 'bp_parse_query'`
> hook firing again.
>
> I've attached a fix so we will remove subsequent calls to
> `bp_parse_ajax_referer_query()`.

New description:

 Ran into an issue in BuddyPress 12 where the `'bp_parse_query'` hook was
 running more than once during AJAX requests.

 The issue is in the `bp_parse_ajax_referer_query()` function. If another
 piece of code runs a `WP_Query` on a BuddyPress AJAX action, then the
 `'parse_query'` hook will run, which would lead to the `'bp_parse_query'`
 hook firing again.

 I've attached a fix so we will remove subsequent calls to
 `bp_parse_ajax_referer_query()`.

--

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


More information about the buddypress-trac mailing list