XF 1.4 Avatar bug?

Frode789

Well-known member
Seems to be some weird avatar problem on one of my members profile. I've selected a new avatar for him (the cat), which is visible in thread view, but I see his old avatar in forum view (for example on alerts or in the recent posts widget).

If I delete his avatar, it still doesn't go away (the old one).

new.webp old.webp
 
Deleting his avatar doesn't stop it from showing up at all? That's strange as it shouldn't even by trying to load the avatar in that case. Can you double check that's the case by checking in an incognito window or different browser after deleting the avatar?
 
@ Maru: We are both seeing the same problem.

@ Mike: Deleting it does remove it, but when I try to add a new one, his old keeps on re-appearing..

In /admin.php?users/yusta.xx/edit I see his old avatar, in admin.php?users/yusta.xx/avatar I see his new.. Weird.
 
This would imply a permission issue in the data/ directory. You should chmod that directory and all files within it recursively to 0777. (This permission config should work for all, but it's not necessary for all servers; you could look at this person's avatars specifically to see if the permissions are out of whack but there may be others as well.)
 
I did CHMOD /data and all its content, then I tried to delete & upload the correct avatar again, but still the same case.

Edit. The folder seems to reset to 0755 after a minute or two. And within the data folder, some are 0755, and some are 0777. Is this normal?
 
That's not normal, especially if it's changing back on you. Can you find the avatars for this user? They'll be in the data/avatars/<s,m,l>/ directories. Divide their user ID by 1000 and round down to find the next directory. The avatar will be <their user ID>.jpg. Are the permissions different in each of the s,m,l directories? How does it compare to the avatar files for your user?
 
That's not normal, especially if it's changing back on you. Can you find the avatars for this user? They'll be in the data/avatars/<s,m,l>/ directories. Divide their user ID by 1000 and round down to find the next directory. The avatar will be <their user ID>.jpg. Are the permissions different in each of the s,m,l directories? How does it compare to the avatar files for your user?

l folder : Same as on my PC. Correct avatar.
m folder: 96 x 96 version. Correct avatar.
s folder: 48 * 48 version. Correct avatar. (which is odd, as this is the version being showed in widgets/online users etc, and is pulling the old avatar.)

I have Gravatar avatar, so I don't pull from my avatar folders, but it works when I test with a local version.

EDIT: Fixed it. Did 777 CHMOD on everything again, then cleared cache and forced purge of CDN cache, and it works now :) So probably was just CHMOD/cache problem.
 
Top Bottom