[buddypress-trac] [BuddyPress Trac] #9108: BuddyPress Classic Plugin Issue: Incorrect Profile Linking in Custom Sub-Navigation
buddypress-trac
noreply at wordpress.org
Sat Feb 24 06:37:36 UTC 2024
#9108: BuddyPress Classic Plugin Issue: Incorrect Profile Linking in Custom Sub-
Navigation
--------------------------+-----------------------
Reporter: vapvarun | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 12.4.0
Component: Navigation | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-----------------------
Changes (by prbot):
* keywords: needs-patch => has-patch
Comment:
''This ticket was mentioned in
[https://github.com/buddypress/buddypress/pull/237 PR #237] on
[https://github.com/buddypress/buddypress/ buddypress/buddypress] by
[https://github.com/imath imath].''
**The BP Core Nav has always stored items using the displayed user ID.**
Before 12.0.0, the `bp_core_create_nav_link()` was forcing the
[https://github.com/buddypress/buddypress/blob/13e73bc821f8dc2fc9ff30d8166d3991268063ab/src
/bp-core/bp-core-buddybar.php#L163 link attribute] of items to be a logged
in user link and a replacement was performed during displayed member
navigation generation so that this link became the displayed user link.
Starting in 12.0.0, this `link` attribute is no more used by default when
creating these nav links, instead, we are
[https://github.com/buddypress/buddypress/blob/master/src/bp-core/classes
/class-bp-core-nav.php#L217 generating this link attribute] using a
function to check whether primary slug items has been customized or not.
Links for the `bp_nav_menu_get_loggedin_pages()` are built using the
`bp_get_component_navigations()` when the BP URL parser is set to
`rewrites` while it keeps on using the BP Core Nav items when it is set to
`legacy`. This is necessary because plugins not ready yet for BuddyPress
12.0 are not registering their nav items but just setting them. For this
particular case: we need to reset the primary item link to the logged in
user one when viewing a member (as nav items are now using the displayed
user link by default).
This will fix the issue for users that are forced to use BP Classic by
plugins not updating their code for the Modern BuddyPress 😫.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/9108
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9108#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list