[buddypress-trac] [BuddyPress Trac] #5343: wrong implementation of bp_group_current_avatar causes display error

buddypress-trac noreply at wordpress.org
Sun Jan 19 15:15:41 UTC 2014

#5343: wrong implementation of bp_group_current_avatar causes display error
 Reporter:  plocha                       |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Groups                       |     Version:
 Severity:  minor                        |  Resolution:
 Keywords:  has-patch reporter-feedback  |
Changes (by imath):

 * keywords:  has-patch => has-patch reporter-feedback


 Hi @plocha

 thanks for your feedback.

 I've made some research, as the image "none.gif" is not in BuddyPress
 trunk version.

 Untill 1.0.3 /bp-groups had a subfolder named image with the image
 "none.gif" in it.
 In 1.1 "none.gif" was moved to /bp-groups/deprecated untill 1.2.

 The $bp->bp_options_nav is used by bp_get_options_avatar() which seems to
 be deprecated

 This function was used in bp-themes folder into the optionsbar.php
 template of these themes
 - by bpmember & bpskeletonmember (1.0)
 - bp-sn-parent in 1.1

 It used has disappeared since bp-default in 1.2.

 1) In my opinion, the function {{{bp_group_current_avatar()}}} should echo
 the current group avatar by using a new function
 {{{bp_get_group_current_avatar()}}} which would return the current group

 In bp-groups-loader.php, line 594, i'm not sur we should use this function
 as normally, the same kind of thing is already done at line 585.

 If line 594 is run, this means {{{bp_core_fetch_avatar()}}} is returning
 nothing. Potential reasons can be that :
 - Showing avatar has been disabled in WordPress discussion settings.
 - current_group id is not set (< this would be strange).

 2) So i think in this case we should simply fill {{{$bp->bp_options_nav}}}
 with the default avatar.

 Attached 5343.diff is doing what's describe at point 1) & 2)

 - (just to be sure) could you indicate in which version of BuddyPress your
 problem happens ? is it 1.9.1 ?
 - In WordPress discussion settings is the Show Avatars options activated ?

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5343#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list