Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#6508 closed defect (bug)

jq('.item-list-tabs li.selected') isn't always defined on directories

Reported by: dcavins's profile dcavins Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3.1
Component: Templates Keywords: has-patch dev-feedback
Cc: david.cavins@…

Description

I noticed that searching on member and group directories was returning the error:

TypeError: jq(...).attr(...) is undefined
-> css_id = jq('.item-list-tabs li.selected').attr('id').split( '-' );
-> buddypr...r=2.3.0 (line 818, col 12)

The cause is that often no tab is selected. My proposed fix falls back on the first tab if no tab is selected.

Attachments (1)

6508.01.patch (755 bytes) - added by dcavins 10 years ago.

Download all attachments as: .zip

Change History (10)

@dcavins
10 years ago

#1 @DJPaul
10 years ago

  • Milestone changed from Awaiting Review to 2.4

Can't wait until we rewrite this JS. :)

This looks OK to me unless someone wants to dive into the theme and figure out why the first tab isn't selected by default (don't we always show the contents of the first tab, which would make that not being selected the real bug, and not this?).

#2 @r-a-y
10 years ago

This could be related to #6143 as well.

#3 @imath
10 years ago

r-a-y is right i think one of the reason is in 6143

@DJPaul +1 and ideally loaded in the footer :)

#4 @dcavins
10 years ago

  • Cc david.cavins@… added

#5 @DJPaul
10 years ago

  • Component changed from Appearance - Template Pack to Appearance - Template Parts

#6 @DJPaul
10 years ago

  • Keywords dev-feedback added

Do we want to go ahead with this interim fix or not bother?

#7 @r-a-y
10 years ago

  • Milestone 2.4 deleted
  • Status changed from new to closed

#6614 has a better patch.

Marking this ticket as a duplicate.

#8 @dcavins
10 years ago

I'm glad somebody worked out the root cause! :)

#9 @DJPaul
9 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.