Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pikurasa opened this issue Oct 20, 2024 · 6 comments · May be fixed by #617
Open

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

pikurasa opened this issue Oct 20, 2024 · 6 comments · May be fixed by #617

Comments

@pikurasa
Copy link
Contributor

[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
Copy link

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
Copy link
Contributor Author

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
Copy link

@pikurasa, can I work on this issue?

@quozl
Copy link
Contributor

quozl commented Dec 7, 2024

Should probably also change the defaultIcon href sooner, using script in index.html, as the way it is happening at the moment in js/main.js on Firefox collides in time with the loading of the default, resulting in NS_BINDING_ABORTED in Console and Network view of Developer Tools.

@vidipsingh
Copy link
Contributor

Hi @pikurasa @quozl,

I’ve submitted a PR (#617) to fix the "favicon not found" error on non-homepage pages, particularly on Firefox. The issue was caused by an incorrect favicon path, and the fix ensures consistent favicon display across all pages.
Please review the PR and let me know if any changes are needed.

@quozl
Copy link
Contributor

quozl commented Dec 29, 2024

Thanks. You don't need to tell us you've made a pull request for the issue, as GitHub automatically tells us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants