Skip to:
Content
Pages
Categories
Search
Top
Bottom

Identicon lost

Viewing 5 replies - 1 through 5 (of 5 total)

  • Prashant Singh
    Participant

    @prashantvatsh


    gingerbooch
    Participant

    @gingerbooch

    Hi @prashantvatsh,

    Thanks for your help. I red that link but it seems my problem is different.
    Actually what I want is my user’s gravatar identicon to be restored after the user deletes his custom avatar.
    When my users register, they automatically get an identicon from gravatar (each one is different). When they change this to a custom avatar, and then delete it, their gravatar is not getting back.
    Instead they get no avatar and their cover-image falls above their profile’s navigation links.

    I’m using Heritage default BP theme.


    Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    I have tried to generate the same scenario with the default theme(2016) and Legacy Template. Please see: https://screencast-o-matic.com/watch/cF6eryYlWO

    It works fine for me. Can you please check the same with default theme as well as try disabling other plugins except BuddyPress to check if any of them created the issue.

    Thanks


    gingerbooch
    Participant

    @gingerbooch

    Hi @prashantvatsh,

    At first, I thought your test was different because the default avatar in you example is a static one called “Logo (Gravatar)”, the same for every users, while mine is a dynamic one called “Identicon (generated)”, a different one for every users.

    I tried your example on a test server, that worked. Then I tried with my case (generated identicon), that worked too !

    Finally I found the reason, in fact the replacement avatar was not coming from the classic “upload a picture”, it was coming from a social plugin (nextend) which retrieves the facebook avatar when you link your WP-account with FB-account, and stores it in the server but in a different folder that buddypress does. (Plus some extra “butterflies” in the DB …)

    I reproduced it several times today to understand exactly what is happening, I write it down in case that could help anyone in the future.

    What I did first was unlinking the FB-account, but I realized the avatar was still there.
    So I clicked on “delete the picture” from my BP-profile page. Success message, but the FB-avatar is still there.
    Then I use “inspect element” on my browser. I found his name is “user-99-2-150×150.jpg” and I get the path to the folder too.
    First I search that file in the database, I found one “_wp_attachment_metadata” in “postmeta” table. I delete the row.

    Here is the point I was stuck on. The picture is gone but there is no more avatar and the header is now above the profile tabs 🙁
    Then I went to the server folders, removed the file but what I missed last time is that there are two files 🙄 … “user-99-2-150×150.jpg” & “user-99-2.jpg” … I deleted both, no changes, and I did it so fast, I forgot there was 2.

    I really thought the problem was coming from BP/Gravatar.com, I thought the path to my original avatar was lost in the DB (and using a dynamic name).
    Finally, thanks to your answer, I just inspected the header again, and found the new avatar link pointing to the second file “user-99-2.jpg” !! Yes !! 🙄

    Back to the database to look for this second file and there are two answers :
    One “_wp_attachment_metadata” row in “postmeta” table -> deleted. (at this stage the original gravatar is back)
    One “attachment” row in “posts” table -> deleted. (no need to keep this row)

    The problem is solved. Thanks a lot for your answer, you drove me to the good direction.
    Have a nice day 🙂


    Prashant Singh
    Participant

    @prashantvatsh

    Glad to know that it helped you 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar