Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#3763 closed defect (bug) (worksforme)

Bad login redirect URL

Reported by: papaenapuros's profile papaenapuros Owned by:
Milestone: 1.6 Priority: normal
Severity: minor Version: 1.5.1
Component: Core Keywords:
Cc:

Description

Hello,

I have a buddypress install in a subfolder in a domain (ie, http://www.mydomain.com/buddypress). That is, http://www.mydomain.com has a Wordpress install, and “/buddypress” is another different install. Both them are single Wordpres installs (not multiuser).

When you send a private message, you receive an email width the text “To view and read your messages please log in and visit: http://www.mydomain.com/buddypres/users/name/messages/” which is a correct URL.

If you click in the link (when logged out), you are redirected to a bad URL. This is:

http://www.mydomain.com/buddypress/wp-login.php?redirect_to=/buddypress/?redirect_to=http://www.mydomain.com/buddypress/users/name/messages

As you can see, there are 2 “redirect_to” parameters. The text “redirect_to=/buddypress/” is not needed, and it’s causing the problem. If I delete it, it works fine and when you’re logged you are redirected to the messages page.

Any idea how to fix it? It seems to be a bug in the core files.

Thanks in advance.

Change History (7)

#1 @papaenapuros
13 years ago

I've checked that in Buddypress.org there is a similar problem. I've received an email after a user has followed me with the following link to change the notifications settings:

http://buddypress.org/community/members/papaenapuros/settings/notifications/

i've logged out and clicked the link. Then, after entering my logging data, I've been redirected to:
http://buddypress.org/?redirect_to=http://buddypress.org/community/members/papaenapuros/settings/notifications

As you can see, the URL is not working.

Bye.

#2 @boonebgorges
13 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 1.5.2

The issue on buddypress.org is different. But your main issue may still be happening, it needs more testing. The second redirect_to is coming from bp_core_no_access(). Not sure where the first one is coming from. Any insight would be welcome.

Putting into the 1.5.2 milestone, but this will be punted if we can't get steps to reproduce.

#3 @boonebgorges
13 years ago

  • Severity changed from major to minor

#4 @papaenapuros
13 years ago

Hello,

Sorry for the delay. Here there are some steps to reproduce it:

1.- Install Wordpress (single). This is not the buddy press installation. I.e., www.mydomain.com
2.- Install Buddypres in a subdirectory, but within another new wordpress single installation. I.e., www.mydomain.com/buddypress. That is, there are 2 single wordpress installations.
3.- Create 2 users in buddy press: user1 and user2.
4.- Send a private message from user1 to user2.
5.- You (user2) will receive an email with the notification. It will have the link: http://www.mydomain.com/buddypres/users/user2/messages/

When you click the previous link, you'll have the issue. Be sure to be logged-out to reproduce it.

Regards.

#5 @DJPaul
12 years ago

  • Milestone changed from 1.5.2 to 1.6

#6 @boonebgorges
12 years ago

  • Keywords needs-patch needs-testing removed
  • Resolution set to worksforme
  • Status changed from new to closed

I've reproduced your setup, but the links and redirects in question work just fine. (FWIW, I don't think that the nested installations have anything to do with it.)

I'm assuming that you have an additional plugin that is causing the stray redirect_to=/buddypress/ parameter.

If you can narrow this down to a specific place in BP (or give detailed instructions on how to reproduce with a fresh BP installation), please reopen with details.

#7 @papaenapuros
12 years ago

You're right. I found the issue: it's due to the "Private BuddyPress" plugin.

Thanks for your efforts.

Note: See TracTickets for help on using tickets.