Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Gryzor on July 25, 2023, 03:18:22 AM

Title: Lost avatars...
Post by: Gryzor on July 25, 2023, 03:18:22 AM
So the other day I ran repair_settings.php because I was having some issues with some hooks, and I didn't pay attention to the directories in it, I presume. My avatars are in a custom directory, /avs instead of /avatars.

So all user avatars were replaced by the generic gray avatar. I changed the location back to /avs, but they're still not back? Basically, all avatars in the threads point to forum_url/avatars/default.png, BUT if I go to a member's profile, their avatar is correctly shown (forum_url/avs/avatar_xx.png)

Right now in repair_settings.php the relevant settings are:

Custom Avatar Directory: path_to_forum/avs
Custom Avatar URL: url_to_forum/avs

Any ideas? The directory, of course, is still there.

Thanks!
PS 2.1.4
Title: Re: Lost avatars...
Post by: Kindred on July 25, 2023, 08:49:14 AM
check your server and/or browser cache?
Title: Re: Lost avatars...
Post by: Gryzor on July 25, 2023, 09:34:14 AM
Quote from: Kindred on July 25, 2023, 08:49:14 AMcheck your server and/or browser cache?
No idea what to check on the server, didn't change anything there and it doesn't seem it causes any errors itself. As for the browser, yup, have tried with different devices, problem persists... 
Title: Re: Lost avatars...
Post by: Steve on July 31, 2023, 01:25:55 PM
Still have the problem?
Title: Re: Lost avatars...
Post by: Gryzor on July 31, 2023, 01:51:43 PM
Quote from: Steve on July 31, 2023, 01:25:55 PMStill have the problem?
Yup, didn't try many things because we were leaving for vacation, hence the lack of updates. But no matter how many times I changed it back and forth, it persists. 
Title: Re: Lost avatars...
Post by: Sir Osis of Liver on July 31, 2023, 09:17:56 PM
Try moving the avatars from /avs to /custom_avatar, fix paths accordingly, see what happens.
Title: Re: Lost avatars...
Post by: Gryzor on August 01, 2023, 07:21:45 AM
Quote from: Sir Osis of Liver on July 31, 2023, 09:17:56 PMTry moving the avatars from /avs to /custom_avatar, fix paths accordingly, see what happens.

Yeah, was thinking of doing that when I get back home...

Btw, do you know why there are two settings -path and url? I guess the software maps the path under the specific URL, but why? 
Title: Re: Lost avatars...
Post by: Kindred on August 01, 2023, 09:13:32 AM
because the server path is not always the same, or even close to url and the system needs BOTH to find and display the files
Title: Re: Lost avatars...
Post by: Gryzor on August 01, 2023, 09:22:03 AM
Quote from: Kindred on August 01, 2023, 09:13:32 AMbecause the server path is not always the same, or even close to url and the system needs BOTH to find and display the files
Yes, the server path is not always the same indeed, but that's why you set it? I guess I'm missing something, but nevermind 🙂
Title: Re: Lost avatars...
Post by: Kindred on August 01, 2023, 02:59:55 PM
maybe I am misunderstanding your question...  but there are a PATH and a URL setting for EACH THING (board url, board directory (path) repeated for - avatars - attachments - themes, etc.)

because if the forum is working with the file system, it needs to path (directory) - if the forum is working with the generated display, it needs the URL.
Title: Re: Lost avatars...
Post by: Gryzor on August 07, 2023, 03:53:26 AM
Quote from: Sir Osis of Liver on July 31, 2023, 09:17:56 PMTry moving the avatars from /avs to /custom_avatar, fix paths accordingly, see what happens.

Just back home from vacation. Changed path to /avs_custom, url to <server>/forum/avs_custom, same result...

It's driving me crazy :(

By the way: if I set the url to /avatars, I get the default.png avatar. If I change that, I get a broken image... But the avatar is still correctly shown under a member's profile with url <server>/forum/avs/avatar.xxx
Title: Re: Lost avatars...
Post by: Gryzor on August 07, 2023, 04:11:40 AM
[SOLVED] Ok, so it was a theme-related mod that had its hooks disabled. Apologies and thanks, everyone!