[buddypress-trac] [BuddyPress Trac] #5762: WP Multi Network plugin & BP 2.0.1 signup
buddypress-trac
noreply at wordpress.org
Sun Oct 18 17:08:13 UTC 2015
#5762: WP Multi Network plugin & BP 2.0.1 signup
------------------------------+-----------------------
Reporter: summoner | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Component - Core | Version:
Severity: normal | Resolution:
Keywords: |
------------------------------+-----------------------
Changes (by needle):
* status: closed => reopened
* resolution: invalid =>
Comment:
I'm reopening this as I believe it is a valid ticket.
Scenario: WP Multi Network, [https://wordpress.org/plugins/bp-multi-
network/ BP Multi Network], BuddyPress activated on a network that is not
the main network.
When a signup occurs (or is attempted) on a network that is not the main
network, BuddyPress cannot locate the `signups` table because the value of
`buddypress()->members->table_name_signups` is set incorrectly.
BP Multi Network works in part by filtering `bp_core_get_table_prefix` to
create new BuddyPress tables per network, so there are tables specific to
that network "attached" to the main site of that network. So, for example,
we get tables such as 'wp_12_bp_activity', 'wp_12_bp_activity_meta', etc
etc. However, the 'signups' table does not have the same
`$wpdb->base_prefix` but is always on the original network, i.e. at
'wp_signups'.
The issue here is that the value of
`buddypress()->members->table_name_signups` is set to
`bp_core_get_table_prefix() . 'signups'` (line 106 of bp-members/bp-
members-loader.php). Therefore it looks to me as though either:
* `bp_core_get_table_prefix()` needs a param passed to it so it can be
optionally filtered, or
* there needs to be a filter at line 106 of bp-members/bp-members-
loader.php. Something like:
{{{
'table_name_signups' => apply_filters( 'bp_signups_table_prefix',
bp_core_get_table_prefix() . 'signups' ),
}}}
The latter option seems less intrusive and would allow BP Multi Network to
correctly address the 'signups' table on the main network.
Am happy to attach a patch if a suitable filter name can be agreed or
suggested.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5762#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list