After recent updates of my Discourse installation, the favicon started failing to load for all logged in users. Intriguing enough, it does load perfectly when you access the website from a private/incognito browser window, but when you log in with any account, it goes back to failing to load.
I’ve deactivated all plugins to see if that would be the problem, but it with no success. As of right now, my Discourse installation is up-to-date. If you want to go check it out, you can do it so at https://dungeon.gg. Here are some relevant screenshots.
I just now did that and re-uploaded the icon, but I’m still getting the same error. The icon is a valid PNG and was working just fine before recent updates from Discourse. I update my installation every week and after the last one, I’ve been facing this issue.
I went ahead and did some more digging and here’s what I found:
The logo loads perfectly, but favicon does not. And you can see that it’s correctly uploaded. But here’s what’s odd: the timestamp is incorrect. As I said, I just did the wizard again and the favicon timestamp should be as if it were uploaded today. So, I went to the site settings again, reset the favicon and uploaded it again. But here’s what my Rails Console is telling me:
output 3: we can see that the reset was successful;
output 4: we can see that the new upload was not actually a new one, it just got the old exact same upload.
And again, I don’t think that the upload is the problem, as it was working before.
So I thought: even thought it look odd, it could maybe be an optimisation strategy developed by Discourse? When the same exact asset is uploaded, just use the old one? So I went ahead and re-uploaded a completely different one, getting this:
If the image is identical, the checksum will match, and Discourse won’t upload a “copy” of the image. I suggest re-optimizing the image so the checksum doesn’t match.
It looks like you have a bunch of third party plugins active. I think you need to disable all those and rebuild. We have no repro of this here, or on try.discourse.org … and if you are running latest code, the main difference would be plugins.
edit: oh wait, re-reading your first post, you DID try disabling all plugins. My bad.
edit: I can confirm it is logged-on user specific, which is real weird… one thing I don’t quite understand is where the default discourse “sketchy” image would be coming from, if you’ve changed all the site images, that image shouldn’t even exist on your site any more …
I tried using safe-mode, disabling all plugins, including official ones. Same problem happened. I guess that’s different from rebuilding?
So I just did the rebuild disabling everything. You can take a look at it again if you want. Still, the problem persists. And it’s for logged in users only.
We can’t repro it here, though, so I have no idea.
What I find extra mysterious is where is that default grey “sketchy” Discourse image coming from because it shouldn’t exist on your site, as you’ve replaced it already.
the current site favicon image seems like a valid PNG
I see no other references to the grey “sketchy” default Discourse logo in the F12 source when logged in
Nothing looks weird to me in the F12 source w/r/t images
If you can figure out what the URL path is to that sketchy image, that’d help. I don’t see how that image should be present on your site at all, you’ve replaced it…
Maybe this is one for @tgxworld to look at, though I’m curious why we don’t see it on meta etc.
I think I found something. In my website, the favicon is being proxied and the proxied link returns that sketchy image of Discourse. But the normal link returns the correct favicon.
Favicon proxy is there cause people used to add URLs to favicon that would point off site, this causes significant issues in all sorts of cases, afaik some browser did not like off site favicon.
All of this magic can be nuked now thanks to @tgxworld’s changes as a favicon is guaranteed to be on-site now due to it being a proper upload.
Will assign to @tgxworld to have a look next week and clean this up. No PRs please quite yet.