NodeBB / NodeBB/NodeBB

Link to favicon not included in HTML when logged in

Open
#6,518 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting for upstream
Dominant language
JavaScript
Stars
15.2k
Forks
3k
Avg merge
16h 19m
Merged PRs (30d)
167

Description

  • NodeBB version: 1.9.2
  • NodeBB git hash: 1233730
  • Database type: mongo
  • Database version: 3.6.4
  • Exact steps to cause this issue:
    • Go to your NodeBB site (private window, so you're not logged in)
    • Press F12 and look at the source code. There should be a <link rel="icon" type="image/x-icon" href="/forum/favicon.ico?v=2amjbe4vk3t" /> or similar in the head part of the HTML.
    • Log in
    • Press F12 and look at the source code. There is no more favicon in the head part.
  • What you expected: I expected that the favicon link would be available independent of being logged in or not.
  • What happened instead: The favicon link disappeared. And the browser then takes another available image (in my case I think it is the OpenGraph image) scaling it down in a horrible way.

I tried to find out why this is happening. But I have no clue. I found the meta.tags.parse and the hook filter:meta.getMetaTags. But after the hook is fired I can still see the icon tag in there. So it probably is removed somewhere later? But when and where and why? Especially the strange difference between being logged in and not?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with meta.tags.parse and the filter:meta.getMetaTags hook mentioned in the report, then compare the generated HTML head for logged-out and logged-in requests. Trace where the favicon link is removed after the hook; done means the favicon link remains available in both states.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.