#4726 closed defect (bug) (duplicate)
Bad titles on directories pages (issue in bp_get_name_from_root_slug)
| Reported by: | slaFFik | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Route Parser | Version: | 1.6.1 |
| Severity: | major | Keywords: | needs-patch |
| Cc: | slava.abakumov@… |
Description
If you create a page called Community (for example) and then create Activity, Members etc pages and assign them to appropriate directory - BuddyPress will work fine (I mean users/groups links etc).
But bp_get_name_from_root_slug() will return false.
Reason - $bp->{$component}->root_slug will use part of url (like community/activity), while bp_current_component() will return just $bp->{$component}->slug. They are not equal and {{{bp_get_name_from_root_slug()}} -> false.
This problem prevents from translating title on directories pages.
$title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug() );
This actually will be just Directory
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
See #4954