Opened 11 years ago
Closed 10 years ago
#5494 closed defect (bug) (fixed)
BP 2.0 beta - Groups Avatars - Notice appears when Avatars are turned off
Reported by: | shanebp | Owned by: | |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | minor | Version: | 1.7 |
Component: | Groups | Keywords: | |
Cc: | shane@…, tw2113@… |
Description
[ When creating a ticket, 'Version' does not include an option for 2.0 ]
If Settings > Discussion > Avatar Display is not selected, then this notice appears wherever a Group Avatar (default or otherwise) is called:
Notice: Undefined property: stdClass::$avatar_thumb in /.../wp-content/plugins/buddypress/bp-groups/bp-groups-template.php on line 526
And an empty rectangle is shown, with an empty img src.
If a Group has an avatar, and then Avatar Display is turned off, then the Notice does not appear, but the empty rectangle is shown.
So maybe the issue lies in the backpat in bp_get_group_avatar() ?
[I don't see 'avatar_thumb' in BP_Groups_Template, at least as called by bp_has_groups() but I've missed the obvious before. ]
Related... ?
When avatars are turned off, the Notice does not appear for Members ( Group or otherwise ).
But in the Group Members screen, the area where the member avatar would appear is still there, so the member's name is pushed down.
Change History (6)
#2
@
11 years ago
- Milestone changed from Awaiting Review to 2.1
- Severity changed from normal to minor
- Version changed from 2.0 to 1.7
#3
@
10 years ago
I don't see 'avatar_thumb' in BP_Groups_Template, at least as called by bp_has_groups() but I've missed the obvious before.
Nor am I, so you're not alone with that fact.
Part of me wants to suggest removing the image tag completely, but then I worry about the possibility that someone has used bp_get_group_avatar filter, so that's more out of the question. But, then there needs to be some sort of default image that we can set to the $avatar_thumb
property in BP_Groups_Template
. It doesn't look like there's any sort of "default" image sets available other than mystery man, and that's intended as a user avatar, not group.
Did some more investigation. I can reproduce the issue at least back to 1.7.x, and looking through the logs it looks like it goes back way further than that.
Let's look for a proper fix in 2.1.