#4849 closed defect (bug) (fixed)
BP Theme Compat My Favorites extra tab in member's profile activity page
Reported by: | imath | Owned by: | |
---|---|---|---|
Milestone: | 1.7 | Priority: | normal |
Severity: | normal | Version: | 1.7 |
Component: | Activity | Keywords: | |
Cc: |
Description
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)
Change History (8)
#2
@
12 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
@
12 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.
Confirmed.
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.