Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#4917 closed defect (bug) (fixed)

subdomain setup in multisite pulls pages from main site

Reported by: astromono's profile astromono Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 1.8 Priority: high
Severity: major Version: 1.7
Component: Core Keywords: needs-testing early
Cc:

Description

Hi, I'm testing the RC1 for BP 1.7 and so far noticed that, even though I have my BP plugin activated only on a subdomain, when I look to assign pages for activity, site tracking, etc. Buddypress is pulling pages from my main site instead of the subdomain I started the install on.

At first I thought it was a glitch with my cache, so I deleted cache and then clicked on "New Page", but then it took me to the page editor of my main domain in the multisite instead of the subdomain I'm using for the setup.

Is this normal behaviour?

Thanks in advance,

Luis

Attachments (1)

4917.01.patch (2.7 KB) - added by r-a-y 11 years ago.
Updated patch to fix wrong isset() check.

Download all attachments as: .zip

Change History (5)

#1 @r-a-y
11 years ago

  • Keywords reporter-feedback added

BuddyPress should do a better job in detecting if it's activated on a sub-blog and not network-activated and should set the BP_ROOT_BLOG constant accordingly.

In the meantime, try adding the following snippet to your wp-content/plugins/bp-custom.php or wp-config.php:

define( 'BP_ROOT_BLOG', $blog_id_of_your_subdomain );

Replace $blog_id_of_your_subdomain with your subdomain blog ID and let us know if that fixes your problems.

#2 @johnjamesjacoby
11 years ago

  • Keywords needs-testing early added; 2nd-opinion reporter-feedback removed
  • Milestone changed from Awaiting Review to 1.8
  • Owner set to johnjamesjacoby
  • Priority changed from normal to high
  • Severity changed from normal to major
  • Status changed from new to accepted

Valid, and reproduced. This isn't a regression, but the bug manifests itself in a different way than it did in 1.6. In 1.6 it appeared in the Network dashboard, where as now it happens on the specific site's dashboard. No functional change, only the location of where you see it happen changes.

What Ray proposes above is the best solution for now, until 1.7 is out and we can put more time into fixing this up nicer, either in 1.8, or 1.7.x.

@r-a-y
11 years ago

Updated patch to fix wrong isset() check.

#4 @boonebgorges
11 years ago

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

In 7192:

Refines the way that BP_ROOT_BLOG is calculated on multisite installations

BP was originally a 'network: true' plugin, making it possible to assume blog 1
as the default value of BP_ROOT_BLOG on a multisite installation, unless
otherwise declared. When the network-only restriction was lifted, it became
possible to activate BP only on a secondary site in a network, in which case
the default value 1 of BP_ROOT_BLOG no longer applies.

This changeset reworks the logic used to calculate BP_ROOT_BLOG, starting with
the assumption that it is the current blog, and only changing it to the
current site's blog_id (blog 1, in non-multi-network setups) when the plugin
is indeed network-activated.

This fixes a number of problems, notably one where it was impossible to set up
the bp-pages associations, because the Pages dropdowns were populated from blog
1 when BP was active only on a secondary blog of a network.

Fixes #4917

Props r-a-y

Note: See TracTickets for help on using tickets.