Skip to content

Upgrade to NodeBB v3? 2BB or not 2BB, that is the question!

Solved Configure
  • I upgraded to NodeBB v3 this week and have to be honest, so far haven’t notice much difference, except for some new problems in Admin panel sidebar!
    I actually wondered after, if I’d done it too soon and should have waited!

    I see people writing there are big changes. NodeBB team the v3 release post said there were too many improvements to list.
    So now I’ve done it I would like to know reasons why it was worth doing 🙂

    @phenomlab You wrote on the NodeBB forum ‘this upgrade is revolutionary. I’ve been playing with replicated (and really stale) data for so long’
    Can you explain what this means? What has changed in relation to ‘stale data’?
    Specifically what does the term replicated data mean, and what is different now?

  • Pandaundefined Panda has marked this topic as solved on
  • @Panda said in Upgrade to NodeBB v3? 2BB or not 2BB, that is the question!:

    You wrote on the NodeBB forum ‘this upgrade is revolutionary. I’ve been playing with replicated (and really stale) data for so long’
    Can you explain what this means? What has changed in relation to ‘stale data’?
    Specifically what does the term replicated data mean, and what is different now?

    That statement about being revolutionary is factual in the sense that the 2.x train of NodeBB used bootstrap v3 whereas the V3 train uses bootstrap v5. This isn’t feature creep - it’s a major change, and whilst not all functionality is obvious to the end user, the changes required under the bonnet are huge - almost a rewrite. The revolutionary part refers to the ability to extend the core even further than was possible before.

    My reference to replicated data meant I had taken a copy of the production database and upgraded my development environment based on that. The comment about stale data is in relation to an older copy of a production database which of course was not synchronised with the live version (which at the time was still running v2). Playing with stale data of course doesn’t give you a true picture of what your forum will look like unless you regularly refresh the development database.

    In short, the difference between the two versions of NodeBB is huge. You only need to look at the github commit log to see how much time and effort has gone into the V3 release.

    Lastly, you say you can’t see any difference - are you using Persona still, or Harmony ? The former is being sunset, so harmony is where all of the changes are taking place, which might be the source of confusion.

  • Ah, will try changing Theme to Harmony!
    Edit: Thats fixed my problems with Admin sidebar!

  • Just done it, can see many changes!
    However, my newly created custom widget doesnt show now.
    How about the unline Users pluggin, will that need reinstalling or should it carry over?

  • @Panda when you change themes, the widget positions are all reset. You just need to put them back to where you’d like them.

  • @Panda said in Upgrade to NodeBB v3? 2BB or not 2BB, that is the question!:

    How about the unline Users pluggin, will that need reinstalling or should it carry over?

    Plugins aren’t uninstalled unless you actually remove them, so no issues there.

  • @phenomlab yes my new Widget wasnt working but it had moved to ‘Draft Zone’ !
    And the Online Users HTML had moved to Draft too. So although thats a plugin it has Widget like element and stopped working on the Theme change

  • @Panda said in Upgrade to NodeBB v3? 2BB or not 2BB, that is the question!:

    So although thats a plugin it has Widget like element and stopped working on the Theme change

    Which is normal based on the widgets being reset when you change themes.


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 💗

  • Upgrade issues

    Solved Configure
    2
    2 Votes
    2 Posts
    136 Views

    Use this code

    git fetch # Grab the latest code from the NodeBB repository git checkout v3.x git reset --hard origin/v3.x

    And you will have the latest version without specifying it

    https://docs.nodebb.org/configuring/upgrade/

  • 1 Votes
    23 Posts
    2k Views

    @DownPW it’s your only realistic option at this stage.

  • 2 Votes
    3 Posts
    156 Views

    Ah silly me, thanks for finding that!

  • 2 Votes
    2 Posts
    149 Views

    @cagatay this relates to a change the css classes used for the brand header meaning it will now float to the left instead of right.

    If you’d like to retain the original behavior, you can add this css class

    [data-widget-area="brand-header"] { justify-content: end; display: flex; }

    Further information here

    https://community.nodebb.org/topic/17090/manual-build-a-custom-header-in-harmony/19?_=1684069325296

  • NodeBB v3 Android Problem

    Solved Configure
    4
    4 Votes
    4 Posts
    189 Views

    thank you fixed.

  • 5 Votes
    13 Posts
    490 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); } };
  • 0 Votes
    4 Posts
    526 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

  • 4 Votes
    8 Posts
    530 Views

    @crazycells hmm. Good point. I actually use my own version of the dark mode plugin, so not entirely sure. However, I think the CSS is probably the same. I’m not at my PC currently but can check and advise later.