Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 16 years ago

#234 closed defect (bug) (fixed)

Site wide Admin bar not XHTML compliant

Reported by: jasonago's profile jasonago Owned by:
Milestone: Priority: minor
Severity: Version:
Component: Keywords: xhtml, menu, admin bar, activity, friends
Cc:

Description

I accidentally found that the site wide admin bar is causing a validation error in xhtml-strict webpages because of:

  1. an extra </ul></div> in the output html.
  2. The <a> element for Activity->My Friends and Friends->My Friends have the same id (a#my-friends). XHTML code should have no duplicate id.

Solution for Bug 1:
I found that this bug can be fixed by removing the extra:

echo '</ul>';
echo '</div>';

from function bp_adminbar_random_menu() in bp-core-adminbar.php

I think the author of this code thought that the ul-div is not closed but actually it will be closed by function bp_core_admin_bar() because there is already a final echo of </ul> and </div>.

Solution for Bug 2:
I think we can just change the 'my-friends' occurences in bp-activity.php especially the one in the function bp_activity_setup_nav()

Change

bp_core_add_subnav_item( $bp['activity']['slug'], 'my-friends', __('My Friends', 'buddypress'), $activity_link, 'bp_activity_screen_friends_activity', false, bp_is_home() );

into

bp_core_add_subnav_item( $bp['activity']['slug'], 'my-friends-activity', __('My Friends', 'buddypress'), $activity_link, 'bp_activity_screen_friends_activity', false, bp_is_home() );

BUT MY PROBLEM is that there are other occurences of 'my-friends' in bp-activity.php namely in function bp_activity_screen_friends_activity() and function bp_activity_action_friends_feed(). Please help me in dealing with the right solution for bug 2 because I'm still new at buddypress codes. I might err on this.

Change History (1)

#1 @apeatling
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, thanks for working out solutions.

Note: See TracTickets for help on using tickets.