#4032 closed defect (bug) (fixed)
bp_get_signup_slug broken in multisite configurations
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
This function will create a link to /register on subsites, which does not exist -- it needs to point back to the main site.
For example, see http://openeconomics.net. The link on the right sidebar should point to the /register page under the http://okfn.org domain (core of the multisite).
Change History (9)
#1
@
13 years ago
- Summary changed from bp_get_members_slug broken in multisite configurations to bp_get_signup_slug broken in multisite configurations
#3
@
13 years ago
Thanks boonebgorges: I was just realising that myself. However, that isn't a sidebar login widget coded by me; it is inherited from the bp default theme.
bp-default/sidebar.php should not wrap the link in site_url() when using a multisite configuration:
<?php printf( ( 'Please <a href="%s" title="Create an account">create an account</a> to get started.', 'buddypress' ), site_url( bp_get_signup_slug() . '/' ) ) ?>
#5
@
13 years ago
I think the problem is that BuddyPress doesn't expect you to use child themes of bp-default on the non-root blog - generally, there's no need to have BP compatibility on a blog other than the main BP blog. (I guess this gets more complicated if you're using BP_ENABLE_MULTISITE.)
Anyway, I think you're right that this should be fixed to point to the root blog.
#6
@
13 years ago
That is unfortunate - we've been refactoring the mess of themes in the okfn.org network of (50+) sites, and I'm trying to get everybody to standardise on my core theme. Which so happens to be a child theme of bp-default, to minimise development overhead and remain as futureproof as possible. Did I make a wrong turn somewhere?
(Theme code is available here: https://github.com/okfn/wordpress-theme-okfn .. as you can see, it's pretty minimal).
#7
@
13 years ago
- Milestone changed from Awaiting Review to 1.6
I think it's fine to do that, it's just not what bp-default expects.
#9
@
13 years ago
OK, that will fix it for bp-default in BP 1.6, which I hope will be out soon. If you're having problems in the meantime, just put a patched sidebar.php into your bp-default child theme (which you can then remove when BP 1.6 comes out if you'd like).
Cool site, by the way! (from a recovering academic)
Hm. Can you give an example of where incorrect links are being created on subsites? I ask because it seems to me that it's not bp_get_signup_slug() that's broken - 'register' is, indeed, the correct slug - but that the wrong code is being used to generate the 'create an account' link on http://openeconomics.net. Did you code that login widget yourself?
The correct way to construct that link would
$href = trailingslashit( bp_get_root_domain() . '/' . bp_get_signup_slug() );