Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Shades. on September 19, 2021, 06:18:54 AM

Title: Some images not showing
Post by: Shades. on September 19, 2021, 06:18:54 AM
I have searched high and low and everywhere but can't find an answer or any logic to this other than microsoft edge browser sucks but here goes...

I have avatar images that appear on my main portal page (ehportal - I can't access their site for help) under Forum Staff and Top Posters. Now, they show up fine whether you're logged in or not and any browser in 2.0.18 before I upgraded to 2.1RC4. But in 2.1RC4, only on Edge browser, if not logged in, those avatar images are broken - not showing. But if logged in they show but for only Admin.

So I did a little experiment and made a copy of the 2.1 forum in a sub folder and guess what...no problems. Those avatars showed up in every browser including Edge whether logged in or not! What am I missing here? Why do they work fine in the sub folder and not on the main domain?

Any ideas?

Sorry wasn't sure exactly where to post this! For some reason I can't access the web dev site to ask for help with the portal over there...I just get those white pages saying to check my firewall! :o


The 1rst attachment is what members & guests see & the 2nd is what I see as admin.
Title: Re: Some images not showing
Post by: Aleksi "Lex" Kilpinen on September 19, 2021, 06:26:48 AM
It is trying to show https://bikerhound.com/index.php?action=dlattach;attach=89;type=avatar
But your avatars are in a custom folder in https://bikerhound.com/custom_avatar/avatar_1_1617562384.png

I'm not sure why it is so, or what to do to fix it - I just know this is the apparent difference in that block and any topic view.
Title: Re: Some images not showing
Post by: Arantor on September 19, 2021, 06:51:50 AM
SMF 2.1 defaults to all avatars in a custom folder because it is vastly more efficient but I don't know why that would only work for admins since avatars don't have a permissions check on them.
Title: Re: Some images not showing
Post by: Shades. on September 19, 2021, 06:57:47 AM
Well I was wrong in first post cause they're not working in chrome or ff either for members & guests. Just for admin :(
Title: Re: Some images not showing
Post by: Arantor on September 19, 2021, 07:18:05 AM
The three avatars work for me in Chrome as a guest, all pointing to the custom_avatars folder.
Title: Re: Some images not showing
Post by: Shades. on September 19, 2021, 07:21:02 AM
I fixed it by reuploading their avatars and now its working like it should! Not sure if it affected any other images or even why that happened but it happened somewhere during the upgrade or something was corrupted and I didn't know about it cause I have no error messages from before or after so I'll mark this solved by reuploading. ;)
Title: Re: Some images not showing
Post by: Shades. on September 19, 2021, 07:21:37 AM
Quote from: Arantor on September 19, 2021, 07:18:05 AMThe three avatars work for me in Chrome as a guest, all pointing to the custom_avatars folder.
Lol yeah I reuploaded them. ;D  But still don't make sense!
Title: Re: Some images not showing
Post by: lurkalot on September 19, 2021, 07:26:32 AM
Quote from: Arantor on September 19, 2021, 07:18:05 AMThe three avatars work for me in Chrome as a guest, all pointing to the custom_avatars folder.

Was going to say the same for me, but in Edge, but my post reply disappeared again. 
Title: Re: Some images not showing
Post by: Aleksi "Lex" Kilpinen on September 19, 2021, 07:28:57 AM
Can confirm it is now loading straight from https://bikerhound.com/custom_avatar/ for me too, so it would appear to be fixed.
Title: Re: Some images not showing
Post by: Arantor on September 19, 2021, 07:37:01 AM
Was this 2.1 a fresh install or upgraded from 2.0?

I'm wondering if there was some upgrade issue if you didn't have a custom avatar folder configured first.
Title: Re: Some images not showing
Post by: Aleksi "Lex" Kilpinen on September 19, 2021, 07:44:53 AM
Since they appeared correctly when inside a topic, I'd suspect the portal myself - The portal block was the one attempting a wrong location for some reason, while SMF actually knew where the avatar is in reality.
Title: Re: Some images not showing
Post by: Arantor on September 19, 2021, 08:05:13 AM
I dunno... just the fact that reuploading the avatars now works correctly means the portal was also correct.
Title: Re: Some images not showing
Post by: Shades. on September 19, 2021, 01:05:22 PM
Quote from: Arantor on September 19, 2021, 07:37:01 AMWas this 2.1 a fresh install or upgraded from 2.0?

I'm wondering if there was some upgrade issue if you didn't have a custom avatar folder configured first.
Upgraded from 2.0.18 and I've actually done this upgrade copy multiple times with same results. My 2.0.18 original has been moved to https://bikerhound.com/2022/index.php if you want to see the differences.

Quote from: Arantor on September 19, 2021, 08:05:13 AMI dunno... just the fact that reuploading the avatars now works correctly means the portal was also correct.
That's what has me stumped too and every time I did this upgrade (cause I thought it was something I was doing) I had to run repair_setting.php and for some reason it would keep messing up the attachments directory to some gibberish and I'd have to go into phpadmin smf_settings to fix it cause it was greyed out in admin settings for some reason.

Now if you look at the old forum (link above) you'll see it pulling the images from index.php?action=dlattach;attach=84;type=avatar while the new upgraded forum (link in sig) is pulling from custom_avatar/avatar_14_1632049757.png
Title: Re: Some images not showing
Post by: Arantor on September 19, 2021, 01:19:07 PM
Well, those URLs are what I would expect from a default 2.0 install to a default 2.1 install - the part that bugs me is the mention of repair-settings clearly doing something to attachments (which would affect avatars)
Title: Re: Some images not showing
Post by: Shades. on September 19, 2021, 01:36:53 PM
My other threads of similar interest:

1. Attachment integrity check (https://www.simplemachines.org/community/index.php?topic=578948.0)
2. Integration hooks error (https://www.simplemachines.org/community/index.php?topic=578894.0) When upgrading this last time this one didn't happen
3. Says Errors but No Errors? (https://www.simplemachines.org/community/index.php?topic=578782.msg4097290#msg4097290) These 2 patches and 2 mods had to be removed before upgrade and had to manually go in and remove the stack_trace column from the ?_error table in database cause the upgrader stalled every time until I uninstalled the stacktrace mod.