Skip to:

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4849 closed defect (bug) (fixed)

BP Theme Compat My Favorites extra tab in member's profile activity page

Reported by: imath's profile imath Owned by:
Milestone: 1.7 Priority: normal
Severity: normal Version: 1.7
Component: Activity Keywords:


In BP Theme Compat (twentytwelve), when on member's profile activity page, if i favorite an activity, a new tab 'My Favorites 1' is added to the item list tabs. So there's 2 "Fav" tabs : "My Favorites" 1 and "Favorites" as shown in the image attached.
The first one shouldn't show there as on BP Default, it's only showing on the main Activity directory and not in the member's profile page.

In the patch, i've simply added a 'li' before the #activity-mentions at line 212 of bp-legacy/js/buddypress.js and it seems to fix the trouble.

Attachments (2)

4849.patch (722 bytes) - added by imath 11 years ago.
user-favorites.png (14.8 KB) - added by imath 11 years ago.

Download all attachments as: .zip

Change History (8)

11 years ago

11 years ago

#1 @boonebgorges
11 years ago

  • Keywords dev-feedback added


This is a very odd issue. This JS is intended to insert a My Favorites button. It just so happens that it hasn't worked in previous versions of BP. It seems to me that we don't actually want this functionality at all, and so we should consider just removing the 'My Favorites' lines altogether.

FWIW, imath's patch "fixes" the issue by re-breaking the JS - li#activity-mentions fails to select any element on the page.

Other devs - could you take a look and see if I'm understanding the issue correctly? If I'm right and this code has never worked, then there's no harm in removing it for 1.7. But it's possible that I'm not right.

#2 @DJPaul
11 years ago

I can't remember how or if this worked pre-BPDefault; if it did, it would have been a long time ago. It seems a very odd thing to want to do here, so I'm +1 for removing it.

#3 @boonebgorges
11 years ago

  • Keywords dev-feedback removed

Thanks, DJPaul. Looks like I was missing something after all. That JS does double duty: it fires when an activity item is favorited from a member's stream (which leads to the problem imath points out above), and *also* when favoriting an item from the global Activity directory. In the latter case, we *do* want to add the My Favorites tab.

So, I'm going to commit a fix that only attempts to add My Favorites when #activity-mentions-personal-li is not found - which is to say, it won't happen in the context of a members page, where there's already a Mentions tab. Also, because the original issues isn't taking place in bp-default (because of the more specific li selector), I'm going to leave it alone - if it ain't broke, etc.

#4 @boonebgorges
11 years ago

  • Keywords has-patch removed
  • Milestone changed from Awaiting Review to 1.7

#5 @boonebgorges
11 years ago

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

(In [6818]) When favoriting an activity item, only attempt to add My Favorites tab if Favorites tab is not already present

This prevents adding My Favorites in the context of a member/group activity
stream, while allowing the tab to be added on the global Activity directory
as intended.

Fixes #4849

#6 @boonebgorges
11 years ago

(In [6819]) Corrects selector from previous commit. See #4849

Note: See TracTickets for help on using tickets.