Skip to content

NodeBB: Favicon upload issue

Solved Configure
  • 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? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

Related Topics
  • how to hide "moved" badge with CSS?

    Solved Customisation
    12
    1
    3 Votes
    12 Posts
    561 Views
    @crazycells ah, I see. That makes sense.
  • Nodebb icon on google page

    Solved Customisation
    9
    1
    4 Votes
    9 Posts
    760 Views
    @Panda It’s been raised multiple times, but only for the open source version, and not hosted.
  • Fixed background to nodebb forum

    Solved Configure
    25
    4 Votes
    25 Posts
    2k Views
    @Panda said in Fixed background to nodebb forum: Chatgpt told me the ::before method. Go figure
  • NodeBB: Upgrading to NodeBB v3.x

    Solved Configure
    6
    0 Votes
    6 Posts
    346 Views
    @mventures You’d need to connect to the server and execute it directly - not on your local terminal. Review the guide below, which will show you how to gain access via SSH to your server https://docs.ovh.com/gb/en/dedicated/ssh-introduction/ Once you have access, you’ll need to navigate to the actual folder where NodeBB is installed You’ll then need to change to the directory as shown below /home/unbuntu/nodebb [image: 1680448167972-fdffe673-bf63-4b6d-a728-5506fddc1aff-image.png] In most cases, initial access takes you to the root of the file system. You can always issue pwd in a Linux terminal which will show you the Present Working Directory. From there, you can issue the command cd /home/ubuntu/nodebb Once in the NodeBB directory, you’d use the below commands ./nodebb stop git fetch && git checkout develop && git reset --hard origin/develop ./nodebb upgrade ./nodebb start Line 1 stops the NodeBB instance Line 2 gets the latest files from GIT (repository) and then checks out the development branch. It then resets the version you are using to the development branch ready for v3 Line 3 Runs the upgrade once the new branch is set, and code pulled Line 4 Restarts the NodeBB instance after the upgrade has completed Note that when you restart NodeBB and log back in, things will look very different to what you had in v2.
  • nodebb loading emojis

    Solved Configure
    16
    1
    1 Votes
    16 Posts
    715 Views
    @DownPW sure. Let me have a look at this in more detail. I know nginx plus has extensive support for this, but it’s not impossible to get somewhere near acceptable with the standard version. You might be better off handling this at the Cloudflare level given that it sits in between the requesting client and your server.
  • 5 Votes
    13 Posts
    719 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); } };
  • who is read NodeBB

    Customisation
    6
    0 Votes
    6 Posts
    673 Views
    @cagatay You should ask in the NodeBB forums. Perhaps reference this post https://discuss.flarum.org/d/23066-who-read
  • Changing Background on NodeBB

    Solved Customisation
    4
    0 Votes
    4 Posts
    656 Views
    @cagatay You’d target the body tag and use the below line of CSS background: url(/assets/customcss/backgrounds/default/default.png) no-repeat center center fixed; Obviously, you need to change the path to suit where your image is being stored. More info around the background property can be found here https://www.w3schools.com/cssref/css3_pr_background.php