https://github.com/NodeBB/NodeBB/issues/4804 - seems like this will be released in 1.7.2
attis
Posts
-
how to merge topics in admin ? -
1.10.0 Breaking ChangesHi,
I think I have discovered another breaking change that you didn't mention, though it is probably super-niche.This commit: https://github.com/NodeBB/NodeBB/commit/ec91ef1c644044bba44198b031913655e784b4bb
broke our custom SSO plugin. The result was that after successfully logging in our external identity provider and being redirected to our Forum's callback endpoint, I was ending up not logged in (the button in the header still said "Log in") and stuck on/register/complete
roadblock. It looked like our Passport strategy verify callback, that parses output from the identity provider and fetches user data via OAuth2 was not invoked at all.It turns out that the changes in this commit don't play well together with
passport-oauth2
(https://github.com/jaredhanson/passport-oauth2) internal ability to protect against CSRF (which we were using). This strategy was already usingstate
parameter to pass its own CSRF token. I don't have more time to investigate but I suspect things shipwrecked when NodeBB overwrote thestate
parameter with its own CSRF token.Turning off
passport-oauth2
internal CSRF protection (by removingstate: true
from its options) fixed the issue. -
Introducing Our New Templating EngineThere's one more breaking change that I did not find documented anywhere.
For our theme we had to change:var templates = require('templates.js'); templates.registerHelper('generateCategoryBorder', helpers.generateCategoryBorder);
to
var Benchpress = require('benchpressjs'); Benchpress.registerHelper('generateCategoryBorder', helpers.generateCategoryBorder);
Not a big deal but some folks might struggle to see why their template helpers don't work on server side.
-
Redis memory usageThanks for the numbers @Giggiux!
I am leaning towards Redis because I don't like how NodeBB structures data inside MongoDB - with Redis it is also not-so-pretty (well, that's how NoSQL operates), but at least I get a feeling that I can search and modify the database by hand, if necessary.
-
NodeBB, now with GIF support! -
Opera ThemeHi, no, it's our own, in-house fork of Persona. Sorry
-
Widget persists and does not respond to any updates.Will try to work on this on Monday. We'll see if I'm still able to reproduce.
Thanks. -
Widget persists and does not respond to any updates.@baris I've added some debug code in the place you mentioned. Having opened two browsers, each connected to a different NodeBB instance I see the following behaviour:
- there's a lot of keys being cleared all the time
- among them, if I modify widgets I see
widgets:global
being cleared but only on the instance that initiated the change. - the second instance shows no sign of clearing
widgets:global
(and the change obviously is not visible on it) - this is consistent for any other change - navbar changes, profile edits...
So the question is: should I not be seeing the same cache key being cleared on both instances?
[UPDATE]
This looks interesting:PUBSUB CHANNELS *2 $27 db:0:adapter_key-request#/# $28 db:0:adapter_key-response#/#
I see no
pubsub_channel
in our Redis instance...[UPDATE 2]
It all seems clear to me now. In https://github.com/NodeBB/NodeBB/commit/e85aabbe74d7838185d0b102bf37a20c1a1b62a1 a logic was added that looks atisCluster
to determine whether initialize "real" pub/sub mechanism or a "fake" local only. In our scenario we have instances running on separate machines and each instance is running just one NodeBB process. ThereforeisCluster
isfalse
as determined byprocess.env.isCluster = ports.length > 1;
inloader.js:118
.I am fixing this temporarily in our codebase by reversing the
if...else if...else..if
so that is does not look atisCluster
insrc/pubsub.js
because I am not sure if "faking" or "forcing" NodeBB to recognize our scenario as clustered is correct and would not have any side-effects.Advices?
To clarify, the code after my fix looks like this:
var pubsub; if (nconf.get('redis')) { pubsub = require('./database/redis/pubsub'); } else if (nconf.get('mongo')) { pubsub = require('./database/mongo/pubsub'); } else { var EventEmitter = require('events'); pubsub = new EventEmitter(); pubsub.publish = pubsub.emit.bind(pubsub); }
Feel free to borrow it if it looks okay to you. It works for us
-
Upgrade path@baris Awesome news! Thanks for the swift reply