Downgrade redis npm module.
hek
Posts
-
Upgrading nodebb from v0.5 to v0.8 (problems) -
CPU utilization increased in 0.6.xHehe.. guess you need kamikaze pilots helping to smoke out those bugs at some point.
-
How to increase Number of URLs in sitemap.xml file?Yep, this is quite important.
Did some test googling... and most of our forum thread content has fallen out of the google index. There are a wealth of information in those threads with lots of technical mumbo jumbo keywords which would drive more sensor-nerds to us if they were searchable.
OT: NodeBB gets appreciation from the members: http://forum.mysensors.org/topic/472/push-notifications
Thanks for all the effort you put into this! -
Lost all my data ? Help pleaseYou have to create your own redis backup script that rotates/saves dump files. By default redis does not make any incremental and or multiple save files.
So if someone connect to your redis instance and do ```flushall`` your database will be gone again. Because the empty db get saved to disk in a few minutes (overwriting your old save-file).
-
Blank sitemapWe have the same problem on our forum (0.8.2). Blank sitemap. Tried disabling/enabling/clearing and setting hard level on number of entries. But still nothing. No errors in log either.
I'm a bit reluctant on re-config everything (not even sure what that means).
I'm running another nodebb forum on the same version on another site. Over there sitemap works fine with 10K entries.
Not sure where to start debugging things.
-
Forum performanceNode.js is very efficient due to it's non-blocking asynchronous nature. It beats PHP every day.
-
Firewall Issues when installing NodeBB on Centos@nhl.pl said:
You have to add firewall rule to allow traffic on port 8000 (WebSockets).
wot? Using websockets don't require you to open any other port than the ordinary one for http/https traffic.
-
[nodebb-plugin-pushbullet] Push Notifications for NodeBBGot it working in our prod-env now. I have no idea why I couldn't get it started in stage.
Anyhow happy!
-
Remove the portUse nginx proxying your requests and setup a firewall.
-
[Solved] Socket.io 400/500 ErrorsAfter spending a few days debugging a problem on our forum/nginx, I've finally found a solution to a massive amount of http 400 errors we've seen when loading the nodebb forum. These problems normally only manifest itself on high load.. In our case >500 connected clients.
In the browser console you will see responses like this (for the failed connections):
{"code":1,"message":"Session ID unknown"}
Background
- When receiving a 4xx error, nginx proxy by default will take the errant upstream out of rotation for 10 seconds
- When upstream-A is unavailable, ip_hash will route all of A's requests instead to upstream-B
- Unfortunately, when upstream-B gets the new requests, it spits out 4xx errors (correctly) because the SID is not found in this.clients
- That makes them get taken out of rotation as well, and their requests get routed to upstream-C
- and so on...
The Solution
Set the max_fails on the upstream to something higher than default (1).
Example:
upstream io_nodes { ip_hash; server 127.0.0.1:4567 max_fails=50; server 127.0.0.1:4568 max_fails=50; server 127.0.0.1:4569 max_fails=50; }
I suggest someone to update the NodeBB documentation, including this in the nginx examples.
-
[nodebb-plugin-blog-comments] Blog Commenting Engine (Ghost, Wordpress widget)I did a integration between forum.mysensors.org and my new open hardware sharing site https://www.openhardware.io using parts of the blog-comments plugin to allow commenting on each project.
From the forum side: http://forum.mysensors.org/category/30/openhardware-io
And from openhardware: https://www.openhardware.io/view/4/EasyNewbie-PCB-for-MySensors#tab-commentsBut as we have to keep title/tags in forum in-sync with the open-hardware-site I had to create a new endpoint which besides creating, also updates the post each time someone published changes. The publishing/update request is sent from our backend.
Here is the interesting part of the code:
Comments.publishProject = function(req, res, callback) { var markdown = req.body.markdown, title = req.body.title, url = req.body.url, commentID = req.body.id, tags = req.body.tags, uid = xxx; if (req.body.token !== "XXXXXXXXXXXXXX") return res.json({error: "Unknown token"}); Comments.getTopicIDByCommentID(commentID, function(err, tid) { if (err ||Â !tid) { var hostUrls = (meta.config['blog-comments:url'] || '').split(','), position = 0; hostUrls.forEach(function(hostUrl, i) { hostUrl = hostUrl.trim(); if (hostUrl[hostUrl.length - 1] === '/') { hostUrl = hostUrl.substring(0, hostUrl.length - 1); } if (hostUrl === req.get('origin')) { position = i; } }); var cid = meta.config['blog-comments:cid'].toString() || ''; cid = parseInt(cid.split(',')[position], 10) || parseInt(cid.split(',')[0], 10) || 1; topics.post({ uid: uid, title: title, content: markdown, tags: tags, req: req, cid: cid }, function(err, result) { //console.log(err); //console.log(err.stack); if (!err && result && result.postData && result.postData.tid) { posts.setPostField(result.postData.pid, 'blog-comments:url', url, function(err) { if (err) { return res.json({error: "Unable to post topic", result: result}); } db.setObjectField('blog-comments', commentID, result.postData.tid); res.redirect((req.header('Referer') || '/') + '#tabs-comments'); }); } else { res.json({error: "Unable to post topic", result: result}); } }); } else { topics.getMainPost(tid, uid, function(err, post) { if (err) return res.json({ok:false}); var payload = { title: title, uid: uid, pid: post.pid, content: markdown, tags: tags, options: { tags: tags } }; posts.edit(payload, function(err, returnData) { if (err) return res.json({ok:false}); //errorHandler.handle(err, res, returnData); res.json({ok:true}); }); }); } }); };
-
NodeBB acting as an OAuth providerWould it be possible to let NodeBB acts as OAuth provider for some other system? I.e. Ghost blogging platform?
Maybe using: https://www.npmjs.com/package/node-oauth2-server
-
nodebb setup takes too longIt's probably the download time for the package-dependencies that takes a while. They all end up in the node_modules folder when ready.
Guess you could have copy ready and just copy it to your NodeBB folder before running setup.
But why is this a problem? What is the use case for shortening this step that usually only is done once?
-
NodeBB Mobile -> Quick way to "scroll" to end of page / latest post+1
This is something out forum members has been complaining about also.
-
nginx reverse proxy not workingMissing a "s" somewhere
-
Anybody using ES6 yet?I've been using promises for a long time. Mostly bluebird and native when possible. Such a relief and makes code readable again!
@julian, you won't miss the callback hell. Promise.
-
NodeBB integration with TapatalkWith the excellent pushbullet support there is really no need for Tapatalk. Works great.
-
Category Header/Introduction TextThey should probably be two different things. Category description should be a short text like today, while the introduction could potentially be longer (and preferable support markup).
Got an even better idea... We could actually use the "Widget" feature. Would only require a new widget property where you can specify which category it should be shown on... that way you could place texts both in header/footer/sidebar for a specific category. Flexible!
-
All hail our global mods!