Opened 11 years ago
Closed 11 years ago
#5166 closed defect (bug) (fixed)
Doubling the same actions
Reported by: | slaFFik | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.9 | Priority: | normal |
Severity: | major | Version: | 1.8.1 |
Component: | Groups | Keywords: | has-patch needs-testing |
Cc: | slaffik |
Description
In one of my plugins I display additional navigation using bp_before_group_body
hook.
Now lets see how BuddyPress loads pages in theme compatibility mode:
1) You open the group page, /groups/single/home.php
is loaded (where header and groups inside data logic). This file has this line on line ~27:
<?php do_action( 'bp_before_group_body' ); ?>
2) In case none of if's below it satisfies the current request it loads /groups/single/plugins.php
. And inside that file we again have the same hook.
<?php do_action( 'bp_before_group_body' ); ?>
The same for
<?php do_action( 'bp_after_group_body' ); ?>
This creates possible content duplication. Like in my plugin's case.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Confirmed. We changed the way plugins.php worked in bp-legacy; before theme compat, it was loaded from
bp_core_load_template()
, so that in these cases home.php was never touched. Once it started getting nested in home.php, we never lost the duplicate hooks.In fact, we also have duplicate markup - #item-body.
I'm pretty sure the solution is as simple as 5166.patch, but I would like a sanity check from another dev that this isn't going to break stuff.