[buddypress-trac] [BuddyPress Trac] #6434: BuddyPress $bp->groups->slug Bug?

buddypress-trac noreply at wordpress.org
Thu May 14 09:11:41 UTC 2015


#6434: BuddyPress $bp->groups->slug Bug?
--------------------------------+-----------------------------
 Reporter:  dunhakdis           |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  high                |  Milestone:  Awaiting Review
Component:  Component - Groups  |    Version:  2.2.3
 Severity:  major               |   Keywords:
--------------------------------+-----------------------------
 Hello!

 So I am developing and updating a BuddyPress theme and I have the latest
 version of BuddyPress installed. I changed my groups page slug into
 'community'.

 Now I have a custom link which is directly linked into groups page using
 $bp->groups->slug. When I visit that page, it returns 404 error.

 After investigating, I tried to echo the returned value of
 $bp->groups->slug and then I realised that the groups slug were not
 updated from 'groups' to 'community' at all.

 So what I did is I manually get the selected page for buddypress groups
 and now it's working.

 Here is the code:


 {{{
 <?php $bp_pages = get_option('bp-pages'); ?>
 <?php $bp_groups_page = get_post($bp_pages['groups']); ?>
 <?php $bp_groups_page_slug = $bp_groups_page->post_name; ?>
 }}}


 I would like to confirm is this is a bug or my fault? I have
 $bp->groups->slug outside bp loop.

 Thank you so much!

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6434>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list