[buddypress-trac] [BuddyPress] #2093: bp_is_page() returns wrong result, crippling user profile navigation functionality

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Feb 28 12:38:36 UTC 2010


#2093: bp_is_page() returns wrong result, crippling user profile navigation
functionality
----------------------------------------------------------------+-----------
Reporter:  foxly                                                |       Owner:     
    Type:  defect                                               |      Status:  new
Priority:  major                                                |   Milestone:     
Keywords:  bp_is_page, header not displaying, BP_XPROFILE_SLUG  |  
----------------------------------------------------------------+-----------
 When a user is on a member's profile page, the call
 "bp_is_page(BP_XPROFILE_SLUG") incorrectly returns FALSE if it is run in
 the header.php file.

 This defect also affects BP_ACTIVITY_SLUG, BP_BLOGS_SLUG, BP_FORUMS_SLUG,
 BP_FRIENDS_SLUG, BP_GROUPS_SLUG, and any pages that take the form
 www.example.com/members/membername/SLUG. It does not affect pages of the
 form www.example.com/SLUG/.

 To replicate:

 On a default installation of buddypress using the default buddypress
 template, add the following code at line 45 in header.php

 <?php if (bp_is_page(BP_XPROFILE_SLUG))echo 'PROFILE TRIPPED';?>
 <?php if (bp_is_page(BP_FORUMS_SLUG))echo 'FORUMS TRIPPED';?>

 When you visit the forums page, "FORUMS TRIPPED" will be displayed in the
 header, but when you visit a user profile page, PROFILE TRIPPED will not
 be displayed.

 ...

 This defect causes a major problem for anyone trying to build buddy press
 navigation menus, because it makes it impossible to identify many of the
 site's pages. It also indicates some kind of underlying defect in how the
 $bp global variable is getting updated.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2093>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list