Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 11 years ago

#2109 closed defect (bug) (fixed)

Buddypress on secondary blog, logout not working properly

Reported by: joezsweet's profile joezsweet Owned by:
Milestone: 1.5 Priority: minor
Severity: Version: 1.5
Component: Core Keywords: has-patch
Cc:

Description

hi,

not sure if this is he right place to post this kind of problems ...bear with me ..

Hi ALL,

Bte, i've installed buddypress 1.2.1 on wordpress 3.0 alfa using a secondary blog.

What happen is that an user (i.e. with test username) is logged in and it works properly.

On logout, from both admin bar and widget, what happen is that user test is logged out, but admin will keep logged in and cant be logged out.

Any hints?

Giovanni

Attachments (2)

2109.diff (825 bytes) - added by wpmuguru 12 years ago.
2109.02.patch (1.1 KB) - added by r-a-y 11 years ago.

Download all attachments as: .zip

Change History (18)

#1 @DJPaul
12 years ago

  • Resolution set to invalid
  • Status changed from new to closed

BuddyPress 1.2 is not built and has not been tested on WP 3.0-alpha. Therefore, you will probably experience issues. Once WP 3.0 is more mature, I suspect the BP core developers will at that point start testing BuddyPress and fixing any WP-3.0 specific issues.

I see you have a forum post with regards this http://buddypress.org/forums/topic/buddypress-on-secondary-blog-logout-not-working-properly

#2 @wpmuguru
12 years ago

  • Component set to Core
  • Keywords has-patch added
  • Milestone set to 1.2.6
  • Resolution invalid deleted
  • Status changed from closed to reopened

The scenario where this occurs is in a single WP install where the Site URL & Home URL are not the same. Patch is attached.

@wpmuguru
12 years ago

#3 @boonebgorges
12 years ago

Don't think there's any need to check for multisite here. $bp->root_domain should already be set to account for multisite, blog url vs site url, etc. The only concern would be BP_ENABLE_MULTIBLOG, when I assume that logout links should redirect back to the current site URL rather than $bp->root_domain.

#4 @johnjamesjacoby
12 years ago

Anymore information on this? It's on the tee to get punted to 1.3.

#5 @boonebgorges
12 years ago

If I remember correctly, an appropriate fix is just to replace site_url() on 94 with $bp->root_domain. But I am in a rush this morning so I can't test it. In any case, it's an edge case so I think it's probably OK to punt if it's holding back 1.2.6.

BTW you do know that punting doesn't happen off a tee, right :-D

#6 @r-a-y
12 years ago

Putted to 1.3 perhaps? ;)

#7 @johnjamesjacoby
12 years ago

  • Milestone changed from 1.2.6 to 1.3

Gooooooooooooaaaaaaaaaaaaaaal! :)

#8 @paulhastings0
12 years ago

  • Summary changed from Buddypress on secondary blog, logout not working properly to [patch] Buddypress on secondary blog, logout not working properly

#9 @DJPaul
11 years ago

  • Keywords needs-testing added

This issue needs to be verified and the patch tested on the current trunk

#10 @r-a-y
11 years ago

I tried to duplicate what wpmuguru mentioned a few comments above where Wordpress is installed in a subdirectory and could not reproduce the problem.

Re: the initial bug report - Does Giovanni mean if he logs out from the frontend, he is still logged in at /wp-admin/? If that is the case, I do not experience this issue on a BP 1.2.6 install where BuddyPress is installed on a secondary blog.

Could use some confirmation from other users.

#11 @DJPaul
11 years ago

  • Keywords reporter-feedback added

Is this related to #3052? We need to audit site_url vs home_url use.

#12 @r-a-y
11 years ago

  • Summary changed from [patch] Buddypress on secondary blog, logout not working properly to Buddypress on secondary blog, logout not working properly

I can confirm the error now by following these instructions:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

home_url() or $bp->root_domain [bp_core_get_root_domain()] should fix all instances. No need to check bp_core_is_multisite() as per wpmuguru's patch.

bp_core_get_root_domain() itself uses get_home_url().

#13 @johnjamesjacoby
11 years ago

I started to audit the site_url() and home_url() usage a few weeks ago, since we used site_url in a ton of places that was causing grief with exactly what r-a-y mentioned above.

#14 @turnheim
11 years ago

You have the problem with site_url versus home_url als in the default theme all over the place.
Would be nice to get this also corrected.
Thanks

@r-a-y
11 years ago

#15 @r-a-y
11 years ago

  • Keywords needs-testing reporter-feedback removed
  • Version set to 1.3

@turnheim - The problem has been noted.

Here's a patch to fix this specific ticket for BP 1.3.

#16 @DJPaul
11 years ago

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

[4142] Use home_url instead of site_url in buddybar my account logout link. Props r-a-y, fixes #2109

Sorry for forgetting props on the commit message

Note: See TracTickets for help on using tickets.