Skip to content

NodeBB: Favicon upload issue

Solved Configure
12 3 1.9k 1
  • Hi,
    I am trying to load a 512x512px favicon to my NodeBB forum, but it doesn’t go past the below status:
    Screen Shot 2023-04-04 at 8.54.21 pm.png
    The above is a PNG file.

    Then, I attempted an upload with a 48x48 .ICO file and that loaded successfully. But it isn’t loading the image on the site though.

    I’ve been reading a thread on NodeBB forum where someone had a similar issue.

    How can I fix this issue? I had this issue in both V2 and now in the V3 versions. I have attempted reload and refresh a few times, but it isn’t helping.

  • I am back - I read the SSH documentation and looks like a “no, can’t do” for me, unless I get handheld training followed by a bit of practice, I don’t think I can do it. Unfortunately/fortunately, I will need to trouble you again for this cache clearance. (FYI - I have a list of coffees owed, and this one is in it)

    @mventures Having taken a look at this, the favicon.ico file is required in two places to work - one is in /public/uploads/system and the other is in public at the root level - see below

    f6be09e5-2afa-41cf-9480-de2bf7fb6fdc-image.png

    I’ve tested this against a favicon checker, and it now works - I used the one you uploaded for the touchicon to generate it.

  • Hi,
    I am trying to load a 512x512px favicon to my NodeBB forum, but it doesn’t go past the below status:
    Screen Shot 2023-04-04 at 8.54.21 pm.png
    The above is a PNG file.

    Then, I attempted an upload with a 48x48 .ICO file and that loaded successfully. But it isn’t loading the image on the site though.

    I’ve been reading a thread on NodeBB forum where someone had a similar issue.

    How can I fix this issue? I had this issue in both V2 and now in the V3 versions. I have attempted reload and refresh a few times, but it isn’t helping.

    @mventures This issue is a common one, and likely because nginx is caching the values it already has. The fastest wat to fix this would be to

    1. Gain access via SSH to your server
    2. Login
    3. Issue command sudo service nginx restart and press enter

    This will cause nginx to restart, and should also empty the cache. Then see if this resolves the issue.

  • @mventures This issue is a common one, and likely because nginx is caching the values it already has. The fastest wat to fix this would be to

    1. Gain access via SSH to your server
    2. Login
    3. Issue command sudo service nginx restart and press enter

    This will cause nginx to restart, and should also empty the cache. Then see if this resolves the issue.

    @phenomlab Would this route work as it seems simpler: Go to ACP > Advanced > Cache?

  • @phenomlab Would this route work as it seems simpler: Go to ACP > Advanced > Cache?

    @mventures No. The nginx server it the web server itself. The ACP is the NodeBB application - they are completely seperated.

  • @mventures No. The nginx server it the web server itself. The ACP is the NodeBB application - they are completely seperated.

    This post is deleted!
  • @mventures No. The nginx server it the web server itself. The ACP is the NodeBB application - they are completely seperated.

    @phenomlab Oh my! Sounds scary again. I read this old post about SSH, and I am not so sure if I want to take any risks 😞

    https://sudonix.com/topic/391/secure-ssh-connectivty?_=1680516532796

  • I am back - I read the SSH documentation and looks like a “no, can’t do” for me, unless I get handheld training followed by a bit of practice, I don’t think I can do it. Unfortunately/fortunately, I will need to trouble you again for this cache clearance. (FYI - I have a list of coffees owed, and this one is in it)

  • I am back - I read the SSH documentation and looks like a “no, can’t do” for me, unless I get handheld training followed by a bit of practice, I don’t think I can do it. Unfortunately/fortunately, I will need to trouble you again for this cache clearance. (FYI - I have a list of coffees owed, and this one is in it)

    @mventures Having taken a look at this, the favicon.ico file is required in two places to work - one is in /public/uploads/system and the other is in public at the root level - see below

    f6be09e5-2afa-41cf-9480-de2bf7fb6fdc-image.png

    I’ve tested this against a favicon checker, and it now works - I used the one you uploaded for the touchicon to generate it.

  • phenomlabundefined phenomlab has marked this topic as solved on
  • @mventures Having taken a look at this, the favicon.ico file is required in two places to work - one is in /public/uploads/system and the other is in public at the root level - see below

    f6be09e5-2afa-41cf-9480-de2bf7fb6fdc-image.png

    I’ve tested this against a favicon checker, and it now works - I used the one you uploaded for the touchicon to generate it.

    Hey @phenomlab, Thanks for looking into this! Did you make the change?
    Because I can still see the BB logo as the favicon on the desktop (safari, chrome) and the mobile.
    But on an iPad, I can see my favicon.

  • Hey @phenomlab, Thanks for looking into this! Did you make the change?
    Because I can still see the BB logo as the favicon on the desktop (safari, chrome) and the mobile.
    But on an iPad, I can see my favicon.

    @mventures

    I have the same problem. I never managed to solve it.

    There is always a moment when I see that of NodeBB when I have nowhere on the server (nginx cache dump, cloudflare, nodebb, etc…)

  • @mventures

    I have the same problem. I never managed to solve it.

    There is always a moment when I see that of NodeBB when I have nowhere on the server (nginx cache dump, cloudflare, nodebb, etc…)

    @DownPW Yes, it can be sporadic, but in the case of @mventures it should be resolved.

    For example, viewing the site in incognito mode

    ce68b924-52ac-4eef-936e-c452037dde20-image.png

    And also checking with several favicon testers

    130425c8-97a2-4c6b-8127-6f5940e42afe-image.png

    @mventures can you try with a browser you’ve never used before, or perhaps an incognito tab? If that doesn’t work, also try the below

    1. Open Google Chrome
    2. Navigate to the website
    3. Open the developer tools (press F12)
    4. Click and hold the browser reload button so that the advanced options appear

    7c8a2857-78b8-4b41-931f-141bd8da8acb-image.png

    1. Select the option to “Empty cache and hard reload”
  • @DownPW Yes, it can be sporadic, but in the case of @mventures it should be resolved.

    For example, viewing the site in incognito mode

    ce68b924-52ac-4eef-936e-c452037dde20-image.png

    And also checking with several favicon testers

    130425c8-97a2-4c6b-8127-6f5940e42afe-image.png

    @mventures can you try with a browser you’ve never used before, or perhaps an incognito tab? If that doesn’t work, also try the below

    1. Open Google Chrome
    2. Navigate to the website
    3. Open the developer tools (press F12)
    4. Click and hold the browser reload button so that the advanced options appear

    7c8a2857-78b8-4b41-931f-141bd8da8acb-image.png

    1. Select the option to “Empty cache and hard reload”

    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Page control arrows for PWA

    Solved Customisation nodebb
    27
    25 Votes
    27 Posts
    8k Views
    @crazycells it is, yes - I think I’ll leave it as there is no specific PWA CSS classes I know of. Well, you could use something like the below, but this means multiple CSS files for different operating systems. /** * Determine the mobile operating system. * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'. * * @returns {String} */ function getMobileOperatingSystem() { var userAgent = navigator.userAgent || navigator.vendor || window.opera; // Windows Phone must come first because its UA also contains "Android" if (/windows phone/i.test(userAgent)) { return "Windows Phone"; } if (/android/i.test(userAgent)) { return "Android"; } if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { return "iOS"; } return "unknown"; // return “Android” - one should either handle the unknown or fallback to a specific platform, let’s say Android } Once you’re in that rabbit hole, it’s impossible to get out of it.
  • NodeBB: Consent page

    Solved Configure nodebb consent
    16
    4 Votes
    16 Posts
    4k Views
    @DownPW I still do not see any issues.
  • NodeBB: Creating pages

    Solved Configure nodebb create page
    9
    0 Votes
    9 Posts
    2k Views
    OK, I think I have figured out how to place a link in the footer which will click to a new page.
  • 5 Votes
    13 Posts
    2k Views
    'use strict'; const winston = require('winston'); const user = require('../user'); const notifications = require('../notifications'); const sockets = require('../socket.io'); const plugins = require('../plugins'); const meta = require('../meta'); module.exports = function (Messaging) { Messaging.notifyQueue = {}; // Only used to notify a user of a new chat message, see Messaging.notifyUser Messaging.notifyUsersInRoom = async (fromUid, roomId, messageObj) => { let uids = await Messaging.getUidsInRoom(roomId, 0, -1); uids = await user.blocks.filterUids(fromUid, uids); let data = { roomId: roomId, fromUid: fromUid, message: messageObj, uids: uids, }; data = await plugins.hooks.fire('filter:messaging.notify', data); if (!data || !data.uids || !data.uids.length) { return; } uids = data.uids; uids.forEach((uid) => { data.self = parseInt(uid, 10) === parseInt(fromUid, 10) ? 1 : 0; Messaging.pushUnreadCount(uid); sockets.in(`uid_${uid}`).emit('event:chats.receive', data); }); if (messageObj.system) { return; } // Delayed notifications let queueObj = Messaging.notifyQueue[`${fromUid}:${roomId}`]; if (queueObj) { queueObj.message.content += `\n${messageObj.content}`; clearTimeout(queueObj.timeout); } else { queueObj = { message: messageObj, }; Messaging.notifyQueue[`${fromUid}:${roomId}`] = queueObj; } queueObj.timeout = setTimeout(async () => { try { await sendNotifications(fromUid, uids, roomId, queueObj.message); } catch (err) { winston.error(`[messaging/notifications] Unabled to send notification\n${err.stack}`); } }, meta.config.notificationSendDelay * 1000); }; async function sendNotifications(fromuid, uids, roomId, messageObj) { const isOnline = await user.isOnline(uids); uids = uids.filter((uid, index) => !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10)); if (!uids.length) { return; } if (roomId != 11) { // 5 Is the ID of the ID of the global chat room. Messaging.getUidsInRoom(roomId, 0, -1); // Proceed as normal. } else { user.getUidsFromSet('users:online', 0, -1); // Only notify online users. } const { displayname } = messageObj.fromUser; const isGroupChat = await Messaging.isGroupChat(roomId); const notification = await notifications.create({ type: isGroupChat ? 'new-group-chat' : 'new-chat', subject: `email:notif.chat.subject, ${displayname}`, bodyShort: `notifications:new_message_from, ${displayname}`, bodyLong: messageObj.content, nid: `chat_${fromuid}_${roomId}`, from: fromuid, path: `/chats/${messageObj.roomId}`, }); delete Messaging.notifyQueue[`${fromuid}:${roomId}`]; notifications.push(notification, uids); } };
  • what does sound/mute button do?

    Solved Customisation nodebb
    20
    1
    9 Votes
    20 Posts
    3k Views
    @crazycells Yeah, looking at the plugin itself, that’s a hard coded limit [image: 1653494282106-3d6dbc10-185b-4102-9470-0c2731a10750-image.png] I’ll probably remove that… eventually…
  • 0 Votes
    9 Posts
    2k Views
    @downpw I’m inclined to agree with this. There isn’t much else you can do, and provided it works with no odd looking artefacts in other browsers, then ok. The :before and :after are pseudo classes and very well supported across all browsers (except perhaps Internet Exploder, but who uses that these days ?)
  • Nodebb Hashtag plugin

    Solved General
    15
    1 Votes
    15 Posts
    3k Views
    @jac Great ! I’ll close this off.
  • Customising NodeBB

    Locked Customisation nodebb
    3
    0 Votes
    3 Posts
    2k Views
    Closing this thread as a duplicate of https://sudonix.com/topic/12/nodebb-customisation