[buddypress-trac] [BuddyPress] #1726: bug in bp_core_set_uri_globals()

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Jan 29 02:35:15 UTC 2010


#1726: bug in bp_core_set_uri_globals()
---------------------+------------------------------------------------------
Reporter:  sbrajesh  |       Owner:     
    Type:  defect    |      Status:  new
Priority:  critical  |   Milestone:  1.2
Keywords:            |  
---------------------+------------------------------------------------------
 bp_core_set_uri_globals() is used to setup the current component/other
 global variables for buddypress.

 While working with my most recent project, I discovered a critical bug
 with it.

 Problem: If you install buddypress in a directory 'x' and there exists a
 component with name 'x' the component will never be loaded, as It resets
 the component.

 How to reproduce: Install wpmu/buddypress in a sub directory say "groups"
 and then activate buddypress, when you will nagivate to
 http://yoursite.com/groups/members/admin/groups, It will not load groups.
 Neither will be this page
 http://yoursite.com/groups/groups

 reason: In bp_core_set_uri_globals(), on line 86-90
 the code
 foreach ( (array)$bp_uri as $key => $uri_chunk ) {
                 if ( in_array( $uri_chunk, $paths )) {
                         unset( $bp_uri[$key] );
                 }
         }
 resets, the component name too, if the path contains a string with the
 name of the component.

 here I am attaching a diff file, which I tested on suubdirectory install,
 but I have not tested it on the main domain install/subdomains, so some
 test may be required.

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


More information about the buddypress-trac mailing list