sugarlabs / www

The Sugar Labs web site
https://www.sugarlabs.org
GNU General Public License v3.0
71 stars 212 forks source link

Favicon gets "not found" error on non-homepage pages #507

Open pikurasa opened 1 month ago

pikurasa commented 1 month ago
[2024-10-20 13:20:37] ERROR `/press/assets/favicon_06.png' not found.
[2024-10-20 13:21:05] ERROR `/about-us/assets/favicon_06.png' not found.

Screenshot from 2024-10-20 13-27-15

I've looked at our logic on /js/main.js, and I don't understand why it would be happening. It looks to me like https://www.sugarlabs.org/assets/favicon_ is hardcoded in (Line 14).

That said, it's not clear to me whether this has any impact on the live site. If not, then perhaps we add a comment noting as much somewhere in the code.

Nama21yo commented 1 month ago

Hi sir, My name is Natnael Yohanes 3rd Year Software engineering Student at AAiT(Ethiopia). I am a Full-stack developer specifically MERN stack and came to SugarLabs to contribute with the skills I have. Could you assign me to this one?

I have checked line 14 and if the logoID is undefined or corresponds to an invalid image, the favicon will fail to load. But it does not necessarily impact the live site negatively if the default favicon is functioning as a fallback (i.e this is the default one <link id="defaultIcon1" rel="shortcut icon" href="{{ site.baseurl }}assets/favicon_06.png" />) We can write an additional fallback code in JavaScript and also comment on the hardcoded URL.

pikurasa commented 1 month ago

I'm not certain that this ever effects the production site.

But I don't understand why we get the error when running it locally.

aayank13 commented 3 weeks ago

@pikurasa, can I work on this issue?