Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#729 closed defect (bug) (fixed)

Admin bar vist random member is broke

Reported by: burtadsit's profile burtadsit Owned by:
Milestone: Priority: major
Severity: Version: 1.0
Component: Keywords: has-patch
Cc:

Description

Using the visit random member doesn't work. Just goes to user profile. The $bp->current_component var is being trashed in bp_core_set_uri_globals() in here:

`

/* Catch a member page and set the current member ID */

if ( $bp_uri[0] == BP_MEMBERS_SLUG && !isset( $_GETrandom? )
in_array( 'bp-core-ajax-handler.php', $bp_uri ) ) {

$is_member_page = true;
$is_root_component = true;


We are within a member page, set up user id globals
$displayed_user_id = bp_core_get_displayed_userid( $bp_uri[1] );


unset($bp_uri[0]);
unset($bp_uri[1]);


if the get variable 'new' is set this the first visit to a new friends profile.
this means we need to delete friend acceptance notifications, so we set a flag of is_new_friend.
if ( isset($_GETnew?) ) {

$is_new_friend = 1;
unset($bp_uri[2]);

}


/* Reset the keys by merging with an empty array */
$bp_uri = array_merge( array(), $bp_uri );

}

`

Well, not with that detection code because it includes the fix. The original code is:

`

if ( $bp_uri[0] == BP_MEMBERS_SLUG
in_array( 'bp-core-ajax-handler.php', $bp_uri ) ) {

`
I have no idea what that code is supposed to accomplish. I do know it trashes the ability to set the $current_component var because it zaps $bp_uri.

Patch adds a skip this stuff if the url is /members/?random

Attachments (1)

random_member.patch (567 bytes) - added by burtadsit 15 years ago.

Download all attachments as: .zip

Change History (6)

#1 @burtadsit
15 years ago

Is it too much to ask of trac that it not trash the code I paste between backticks? What's the proper syntax to tell this brain dead software to leave my code alone? The devs couldn't possibly imagine that *code* would be pasted in a piece of software dedicated to software development? I'm on a roll this morning.

#2 @burtadsit
15 years ago

Ok. I see it on the toolbar. Why does every tool I use have to re-invent the editor?

#3 @burtadsit
15 years ago

I mean really. When I borrow a car I don't check to see if the gas and brake pedals have been switched in a fit of whimsy by the designers.

#4 @apeatling
15 years ago

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

Fixed in 1.0.1

#5 @(none)
15 years ago

  • Milestone Core 1.1 deleted

Milestone Core 1.1 deleted

Note: See TracTickets for help on using tickets.