#5567 closed defect (bug) (fixed)
Nested activity comments do not show when logged out
| Reported by: |  | Owned by: |  | 
|---|---|---|---|
| Milestone: | 2.1 | Priority: | high | 
| Severity: | normal | Version: | 1.5 | 
| Component: | Appearance - Template Pack | Keywords: | needs-patch good-first-bug commit | 
| Cc: | wolfhoundjesse@… | 
Description
Reported here:
http://buddypress.org/support/topic/show-activity-comments-to-everybody/
Problem occurs because we have a is_user_logged_in() check before activity comments are rendered.
This change was added in r4691 in bp-default and ported over to bp-legacy.
Any reason why this is done?  Since this is quite old and no one has really reported it until now, is it an issue?
Attachments (2)
Change History (15)
    
      
    #2
  
    
        
          
             @
 @
            
11 years ago
        
    
  
  
  - Keywords needs-patch added; 2nd-opinion has-patch removed
I think we should move the is_user_logged_in check inside the bp_activity_can_comment as that seems a logical place. Would be nice if someone catch patch this or Boone's suggestion together for 2.1; I'm not fussed either way.
    
      
         
        
This ticket was mentioned in IRC in #buddypress-dev by paulgibbs. View the logs.
      
      
11 years ago
    
    
  
              
    
      
    #6
  
    
        
          
             @
 @
            
11 years ago
        
    
  
  
  - Cc wolfhoundjesse@… added
Good morning,
I changed the check so that existing comments would be displayed:
- if they indeed exist
- if comments are allowed on this particular activity
I left the check for whether or not the activity is_single. If the user is logged in and comments are allowed, display the comment form.
I completed the OpenHatch missions, but I'm very new to SVN. I'll attach a diff so that you can offer some guidance/criticism/taunts! 
    
      
         
        
This ticket was mentioned in IRC in #buddypress-dev by paulgibbs. View the logs.
      
      
11 years ago
    
    
  
              
    
      
    #9
  
    
        
          
             @
 @
            
11 years ago
        
    
  
  
  - Owner set to djpaul
- Resolution set to fixed
- Status changed from new to closed
In 8762:
Weird. I assume that
bp_activity_can_comment()was a poor-man's way of checking whether comments could exist for the given activity item. (The commit message is not very explicit and there is no linked ticket :-/)IMO, the proper logic is something like: show the activity section if one of the following is true:
In other words:
if ( bp_activity_get_comment_count() || ( is_user_logged_in() && bp_activity_can_comment() ) )Does that seem right?