ps enhancements:
- types support(via @types),which can improve developers' exp
- just by
npm i @types/nodebb
etc
- just by
ps enhancements:
npm i @types/nodebb
etcDo you have a plan to make changes in database?
I think the structure currently can't make the full use of the performance the database can be(mongo, etc).
we should better make a plan to design a more powerful structure.
Our guests(users of NodeBB in China) give suggestions:
what's about importing the mvvm framework?
i think importing mvvm framework(like Vue) is a good design to develop a powerful community platorm.
A strong business store for NodeBB?
Reasons:
托管于语雀:https://yuque.com/a632079/nodebb
文档覆盖了 NodeBB 英文文档提及的所有内容,并补充了一些内容。
主要内容:
This is a chinese document of nodebb, created by me, who is a transifex reviewer.
@pitaj yeah. It's starting work
@pitaj The title is NodeBB中文社区
, including chinese (non-latin-character).
This error won't occur while the version of NodeBB is below 1.8.x
.
And More, Many Users flag this problem to me.
While visit ACP Page, this error was throwed.
Is is a config problem, or others?
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: 2018-04-07T15:43:46.960Z [30948] - error: [acp] Failed to fetch latest version TypeError: The header content contain
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at validateHeader (_http_outgoing.js:494:11)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at ClientRequest.setHeader (_http_outgoing.js:498:3)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at new ClientRequest (_http_client.js:173:14)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Object.request (http.js:38:10)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Object.request (https.js:239:15)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Request.start (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request/request
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Request.end (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request/request.j
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at end (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request/request.js:561:14
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Immediate.<anonymous> (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at runCallback (timers.js:794:20)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at tryOnImmediate (timers.js:752:5)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at processImmediate [as _immediateCallback] (timers.js:729:5)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: 2018-04-07T15:43:46.983Z [30948] - error: [acp] Failed to fetch latest version TypeError: The header content contain
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at validateHeader (_http_outgoing.js:494:11)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at ClientRequest.setHeader (_http_outgoing.js:498:3)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at new ClientRequest (_http_client.js:173:14)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Object.request (http.js:38:10)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Object.request (https.js:239:15)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Request.start (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request/request
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Request.end (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request/request.j
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at end (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request/request.js:561:14
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at Immediate.<anonymous> (/data/nodebb/node_modules/.registry.npm.taobao.org/request/2.83.0/node_modules/request
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at runCallback (timers.js:794:20)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at tryOnImmediate (timers.js:752:5)
Apr 07 23:43:46 jdu4e00u53f7 nodebb[30925]: at processImmediate [as _immediateCallback] (timers.js:729:5)
@julian Ahhh, It's great! Thanks.
@julian First, Thank you very much. but after testing, I found it's still unable to let ajax request to redirect.
To solve it, should I use res.render('template')
or use filter:middle.render
to add a script to redirect?
@julian I am troubled by this problem for many days. Now I can continue to develop. Thank you very much
@julian Thank you very much
If there is a specified key in the session, I want any page to be redirected to the page I specified.
For example, If user visit /recent
/topic
,it will be redirected to /register
(if session is set.)
I tried to use the hook filter:middleware.render
.If enter the page directly, it works well.But if you change page via ajax(click Home button etc.), it will throw a error : res has been sent.
I also tried the hook filter:router.page
.But I don't know how it works. I search for this hook in Github, But I can't find something useful.
Could you give me any help? I don't know how to solve it exactly.I will appreciate it if you help me.
@julian for example: I put connect save to session.And when the session exists, when I load any page I want to redirect to the page I specified.(e.g I view /recent
,redirecting to /register
)
I tried to do an account synchronization plugin, but the middle of the need to force the routing of the jump.(I want to use filter:router.page
,but i don't know how to use it.)
I tried filter:middleware.render
, like below: (But it is not a friendly way.I want to handle redirect via a simple method.Cloud you help me ? Thanks you.)
if (data.req.session.hasOwnProperty('connect') && !(Array.isArray(data.templateData.url.match(/register/))) && (!data.req.hasOwnProperty('user') || !data.req.user.hasOwnProperty('uid') || data.req.user.uid === 0)) {
if (data.req.headers['x-requested-with'] && data.req.headers['x-requested-with'].toLowerCase() === 'xmlhttprequest') {
// is ajax
callback(new Error('Emmm. Use F5 to redirect truly page'))
} else {
// is common request
data.res.redirect('/register')
callback(null, data)
}
} else if (data.req.session.hasOwnProperty('cuser') && !(Array.isArray(data.templateData.url.match(/connect\/login/)))) {
if (data.req.headers['x-requested-with'] && data.req.headers['x-requested-with'].toLowerCase() === 'xmlhttprequest') {
// is ajax
callback(new Error('Emmm. Use F5 to redirect truly page'))
} else {
// common request
data.res.redirect('/connect/login')
callback(null, data)
}
} else {
.........
Above all,I haven't done i18n. It only support Chinese now . I'm welcome if you want to translate it to your language.
Github repo: https://github.com/a632079/nodebb-sso-wechat-web
This plugin allow you login via the qrcode of wechat. First , you should apply for a website app in WeChat Open Platform .And then use the appId
and appSecret
that you get from the platform for setting in ACP.
Search nodebb-plugin-sso-wechat-web
in ACP and install it.
Some Oauth App don't offer email , so we require users to perfect their email setting.(Thanks for sso-facebook
)
Support use the WeChat Avatar as your profile avatar. (Thanks for gravatar
)
@baris said in what happened in Recent.js ? (Is it possible cause in Database?):
Seems like you have a topic with an invalid cid, should be fixed in master.
I have changed the branch into master
,and it can run well now. Thanks you very much.
NodeBB V1.6.0 (1.4.2 -> 1.4.3 -> 1.4.4 -> 1.4.5 -> 1.4.6 -> 1.5.0 -> 1.5.1 -> 1.5.2 -> 1.5.3 -> 1.6.0 );
Use MongoDB as driver.
When visit /recent
,it reported :
5/10 11:46:45 [2313] - error: TypeError: Cannot read property 'toString' of null
at /home/nodebb/src/topics/recent.js:87:51
at Array.filter (<anonymous>)
at /home/nodebb/src/topics/recent.js:85:30
at nextTask (/home/nodebb/node_modules/async/dist/async.js:5297:14)
at next (/home/nodebb/node_modules/async/dist/async.js:5304:9)
at /home/nodebb/node_modules/async/dist/async.js:906:16
at /home/nodebb/node_modules/async/dist/async.js:3861:9
at /home/nodebb/node_modules/async/dist/async.js:421:16
at iterateeCallback (/home/nodebb/node_modules/async/dist/async.js:928:24)
at /home/nodebb/node_modules/async/dist/async.js:906:16
at /home/nodebb/node_modules/async/dist/async.js:3858:13
at /home/nodebb/src/database/mongo/sorted.js:64:5
at handleCallback (/home/nodebb/node_modules/mongodb/lib/utils.js:120:56)
at /home/nodebb/node_modules/mongodb/lib/cursor.js:860:16
at handleCallback (/home/nodebb/node_modules/mongodb-core/lib/cursor.js:171:5)
at setCursorNotified (/home/nodebb/node_modules/mongodb-core/lib/cursor.js:515:3)
5/10 11:46:45 [2313] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
5/10 11:46:45 [2313] - info: [app] Database connection closed.
5/10 11:46:45 [2313] - info: [app] Web server closed to connections.
5/10 11:46:45 [2313] - info: [app] Shutdown complete.
[cluster] Child Process (2313) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
5/10 11:46:45 [2322] - error: TypeError: Cannot read property 'toString' of null
at /home/nodebb/src/topics/recent.js:87:51
at Array.filter (<anonymous>)
at /home/nodebb/src/topics/recent.js:85:30
at nextTask (/home/nodebb/node_modules/async/dist/async.js:5297:14)
at next (/home/nodebb/node_modules/async/dist/async.js:5304:9)
at /home/nodebb/node_modules/async/dist/async.js:906:16
at /home/nodebb/node_modules/async/dist/async.js:3861:9
at /home/nodebb/node_modules/async/dist/async.js:421:16
at iterateeCallback (/home/nodebb/node_modules/async/dist/async.js:928:24)
at /home/nodebb/node_modules/async/dist/async.js:906:16
at /home/nodebb/node_modules/async/dist/async.js:3858:13
at /home/nodebb/src/database/mongo/sorted.js:64:5
at handleCallback (/home/nodebb/node_modules/mongodb/lib/utils.js:120:56)
at /home/nodebb/node_modules/mongodb/lib/cursor.js:860:16
at handleCallback (/home/nodebb/node_modules/mongodb-core/lib/cursor.js:171:5)
at setCursorNotified (/home/nodebb/node_modules/mongodb-core/lib/cursor.js:515:3)
5/10 11:46:45 [2322] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
5/10 11:46:45 [2322] - info: [app] Database connection closed.
5/10 11:46:45 [2322] - info: [app] Web server closed to connections.
5/10 11:46:45 [2322] - info: [app] Shutdown complete.
[cluster] Child Process (2322) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
I have installed Recent Card Plugins,but it crashed(Can't display the card in home page).So,I disabled it.
@herect You can try replace "font.useso.com" to "fonts.gstatic.com" and publish as a new plugin
@jenkler said in Okay this is ridiculous:
Here are some tips!
- Don't use the latest branch if you want something stable!
- Setup a dev and try the updates before production use.
- NodeBB is free and Opensource. You can't simply complain on the support for something that is free man.
- Learn nodejs and try to help out. There are a lot of things that we need help with.
- If you need help and require support there is a simple way. Just pay for support. We have a lot of people here that are willing to help out for a small fee. (Me included, mostly have swedish customers but an exception can be made)
I agree with your point of view. Time is priceless, it is impossible to spend 24 hours to help others free of charge.
Have you tried run ./nodebb setup
or ./nodebb build
? It seems that it did't build the static files.