Opened 10 years ago
Closed 10 years ago
#6108 closed defect (bug) (wontfix)
BuddyPress.org - 5 of the 7 navigation links are highlighted in all Member Profile pages
Reported by: | mercime | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | BuddyPress.org Sites | Keywords: | close |
Cc: | r-a-y |
Description
Screenshot attached.
Attachments (1)
Change History (8)
#2
@
10 years ago
As of BP 2.2, all BP pages are set to the page ID of zero.
Using is_page( 'ANYSLUG' )
on a single BP page with theme compatibility enabled will always return true
.
This is due to a bug with the is_page()
function when a page ID is zero.
This is a WP core bug: #WP24674.
I've added a patch to the WP ticket for those that are interested:
https://core.trac.wordpress.org/attachment/ticket/24674/24674.ray.patch
The header for buddypress.org uses a ton of is_page( 'PAGE_SLUG' )
:
https://meta.trac.wordpress.org/browser/sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/header-nav.php
This is causing the multitude of tabs being highlighted on member profile pages.
In the meantime, switching to using a WP nav menu might fix this issue.
This bug was also mentioned on the forums:
https://buddypress.org/support/topic/version-2-2-0-and-is_page/
#3
@
10 years ago
Thanks for looking into this more, r-a-y. I've left a comment and a new patch on the WP ticket. Could you weigh in?
#5
@
10 years ago
I don't get the impression that there's a rush to push for a solution on that WP ticket, this has reared it's ugly head for me so any legitimate check a site does using is_page() has to be accompanied by a !bp_is_user() :)
#6
@
10 years ago
- Keywords close added
https://core.trac.wordpress.org/changeset/31458 In your face, hnla ;)
May I suggest a wontfix here? I don't think it's worth doing any additional juggling in BP if this will be fixed in WP 4.2+.
r-a-y did we have a patch that I think you committed recently that addressed menu highlight classes? If so, I believe the next beta/RC should fix this on BP.org.