Support » Plugin: BP Avatar Suggestions » User Selected Avatars not appearing anywhere

  • Resolved mattfaw


    Hey imath,

    Thanks for the great plugin. Just installed it last night and I have been fiddling with it since then. So far everything acts like it is working – but no avatars appear anywhere other than the User Profile page. So if I browse to the “Members” section, the avatars are still blank. But if I go to User Profile, the selected avatar will appear.

    If i try deactivating the selected avatar and picking it again, it generates an error.

    Any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • What version of WP and BP are you using ?
    What is the theme you use ?

    This plugin was tested with WP 3.4.2; 3.5 trunk and BP 1.6.1 and trunk, without warranty for working on previous versions.

    I’m on 3.4.2 as well.

    BP 1.6.1

    Pinboard Theme with BP compatibility.

    Actually I need to change that initial error – The selected avatar isn’t displayed anywhere. I thought it was still displaying in the profile field, but that was incorrect.

    So, I select an avatar from the suggested list, click activate, get the successfully activated message, and as soon as I click on a different page my selection is erased.

    Sorry for the misinformation initially.

    Can you test your site with the BP default theme, to elimate any custom template disfunction?

    Salut @danbp, merci pour ton aide 🙂


    I just downloaded, activated your theme + bp template pack and bp-avatar-suggestions is working fine…

    So i guess it might be a plugin that is dealing with bp_core_fetch_avatar or you changed the default image used by BuddyPress (you’re not using /wp-content/plugins/buddypress/bp-core/images/mystery-man.jpg).

    Let’s try to understand what’s happening by explaining what the plugin is doing
    1/ when you activate a suggested avatar when on the user’s change-avatar page, it adds a user_meta in {table_prefix}usermeta, the name of this meta is ‘user_avatar_choice’. If it succeeds, then the image is updated on this page thanks to ajax / jQuery.. So first look in your usermeta table to see if you actually have this meta with url to your suggested avatar.

    2/ BuddyPress uses a function bp_core_fetch_avatar to filter WordPress function get_avatar. My plugin is filtering bp_core_fetch_avatar very early with a priority of 1. So if you have a plugin or a theme function that filters bp_core_fetch_avatar later then it might avoid the suggested avatar to be displayed. There can be also a case when a plugin or a theme’s function uses the same priority and then changes the src attributes of the image. So if i were you, i would try to
    – edit line 86 of bp-avatar-suggestions/includes/bp-avatar-suggestions-front.php by replacing the priority to 9999.
    add_filter('bp_core_fetch_avatar', 'bp_as_fetch_suggested_avatar', 9999, 9 );
    now if the problem is still there, it might be that the src attributes does not contain the mystery man.. So try to comment line 92 and 101 to avoid the if statement and to force the image replacement.

    3/ if problem still there, the search for add_filter('bp_core_fetch_avatar with a text editor that allows you to search in all the files of your config to figure out what plugin / function is playing with it…

    hope this will help you find where the trouble is..

    Hey imath,

    Thanks for the excellent response. I am at work currently, but I will be going through your list as soon as I am done. I will report back here with my results.



    Found a few minutes so I dove in 😛

    This is now resolved. Thank you very much for the quick and detailed response imath.


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘User Selected Avatars not appearing anywhere’ is closed to new replies.