Skip to:

Opened 10 years ago

Closed 10 years ago

#5737 closed defect (bug) (fixed)

Problem with log out link

Reported by: slaffik's profile slaFFik Owned by: r-a-y's profile r-a-y
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch reporter-feedback


Install WordPress a bit differently, than usual: in a subdir. So wp-admin and wp-includes folders are in lets say /wp folder. Move wp-content out of /wp folder - one level up. So now home_url() is and site_url() is

From this time Log out links generated by BuddyPress in (for example) wp-admin area Menu page will not work as expected. Log out link will generate a default redirect url to site_url(), which is wrong, and should be home_url().

Also in different part of the BuddyPress code different param is used for wp_logout_url(), which is not good.

Attachments (1)

5737.01.patch (1.8 KB) - added by r-a-y 10 years ago.

Download all attachments as: .zip

Change History (7)

#1 @boonebgorges
10 years ago

Is this a problem with wp_logout_url(), or is the problem that BP doesn't always use wp_logout_url() when it should?

#2 @slaFFik
10 years ago

The problem is with the parameter that you (in general, not personally you) pass to wp_logout_url(). It should not be always site_url(), but better home_url() instead. And sometimes you use wp_guess_url(). So it might be a good idea just to stack with 1 version, like the latter one.

#3 @r-a-y
10 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.1

slaFFik - Let me know if 01.patch fixes your problem. We don't really use site_url() any more, but wp_guess_url() does, so I switched all instances of wp_guess_url() to bp_get_requested_url(), which is better and should detect the correct URL.

10 years ago

#4 @boonebgorges
10 years ago

  • Keywords reporter-feedback added

+1 from me, if it fixes slaFFik's problem.

This ticket was mentioned in IRC in #buddypress-dev by paulgibbs. View the logs.

10 years ago

#6 @r-a-y
10 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 8680:

Replace wp_guess_url() with bp_get_requested_url().

wp_guess_url() doesn't work well with subdirectory installs and anyway,
bp_get_requested_url() is superior!

Fixes #5737.

Note: See TracTickets for help on using tickets.