Skip to:

Opened 7 years ago

Closed 7 years ago

#7490 closed defect (bug) (fixed)

FIX: Impossible to display older activity comments

Reported by: antonioeatgoat's profile antonioeatgoat Owned by: r-a-y's profile r-a-y
Milestone: 2.9 Priority: low
Severity: critical Version:
Component: Activity Keywords: has-patch


It isn't possible to display more than 5 comments, the button 'Show all comments' doesn't have any effect. This happens because the older comments are hided twice: using inline style ( jq(this).toggle(); ) and css class 'hidden'.
When an user click on 'Show all comments', the inline style changes, but the 'hidden' class remains and override the style.

Removing this line it works again and I cannot find any collateral effect.

Attachments (2)

buddypress.js (61.0 KB) - added by antonioeatgoat 7 years ago.
7490.01.patch (670 bytes) - added by r-a-y 7 years ago.

Download all attachments as: .zip

Change History (12)

#1 @hnla
7 years ago

@antonioeatgoat I failed to replicate the issue, on trunk with standard WP theme(2017) the 'show more comments' link worked as expected.

Can you ensure you have nothing that might be conflicting, and test on a stock WP theme & report back.

#2 @antonioeatgoat
7 years ago

Hello @hnla, my comments is partially wrong, I've tested with 2017 theme but I didn't notice there was some plugins active, it works for me as well in this case. However, I think that my thread is still quite valid, for two reasons:
1) I don't see why it is hidden using both inline style and 'hidden' class
2) The issue that I described persists if bootstrap css is loaded, which is quite common. This happens because bootstrap declares an hidden class as below (which is quite common in every css utility files, not only in bootstrap):

.hidden {
display: none !important;

So the new inline style display: list-item doesn't take effect. You can try it adding that class in the inspector of the browser.

I hope that I there aren't other mistakes on my side this time and I am sorry for the confusion.

#3 @hnla
7 years ago

@antonioeatgoat sadly the problem here is two fold, use of a common class name and on the part of Bootstrap forcing !important on their property.

There isn't an easy solution here, we can't easily go about changing class names for fear of upsetting existing layouts, although that may be a small edge case.

#4 @antonioeatgoat
7 years ago

Hello @hnla, a solution could be keep the class 'hidden'. Once the button 'Show all comments' is clicked, besides change the inline style, also remove the 'hidden' class.

It's just an idea, of course you know the situation better than me, but I think it's fair enough. Actually, the most important thing, I don't see why a class called 'hidden' should remains on an item not longer hidden.

Last edited 7 years ago by antonioeatgoat (previous) (diff)

#5 @hnla
7 years ago

@antonioeatgoat It's a possible solution, would need to look at why this wasn't done in the first place though.

#6 @Sweeny
7 years ago

@hnla @antonioeatgoat


I have the same problem: Only five comments are displayed.

Any news/bugfix?

Kind regards

#7 @hnla
7 years ago

  • Milestone changed from 2.8.3 to 2.9

#8 @r-a-y
7 years ago

  • Version 2.8.2 deleted

Related: #7443.

7 years ago

#9 @r-a-y
7 years ago

Can confirm the problem. Bootstrap is awesome /s.

01.patch should fix the issue.

Tested on the WP Bootstrap Starter theme. Also tested on Twenty Twelve and no breakage! :)

#10 @r-a-y
7 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 11597:

bp-legacy: Fix older activity comment display when clicking on the "Show All Comments" button in some instances.

Previously, we were adding the .hidden CSS class to either style or hide
older activity items (not sure what the original intention behind this
class was). This can conflict with themes (particularly those powered by
Bootstrap) or plugins using the .hidden CSS declaration in their
stylesheets to hide the item entirely using the display: none rule.

To fix this issue, this commit removes the .hidden CSS class addition
entirely and hides the activity comments using jQuery's hide() function.

Props antonioeatgoat.

Fixes #7490.

Note: See TracTickets for help on using tickets.