@fortunato I forgot to say that this error doesn't show up when creating a new topic and sometimes it works also in replies. The error in the NodeBB UI is the following: "stream ended unexpectedly"
fortunato
Posts
-
Image upload -
Image uploadWhen uploading an image on IE11 I got this error:
error: stream ended unexpectedly {"expose":true,"statusCode":400,"status":400,"stack":"BadRequestError: stream ended unexpectedly at Form.<anonymous> (C:\\Program Files\\NodeBB\\node_modules\\multiparty\\index.js:759:24) at Form.emit (events.js:194:15) at finishMaybe (_stream_writable.js:641:14) at endWritable (_stream_writable.js:649:3) at Form.Writable.end (_stream_writable.js:589:5) at IncomingMessage.onend (_stream_readable.js:629:10) at Object.onceWrapper (events.js:277:13)\n at IncomingMessage.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) at process._tickCallback (internal/process/next_tick.js:63:19)"}
With Chrome and Firefox the upload works correctly.
I am using NodeBB v1.12.0 with Composer and Markdown plugins activated.
It looks like a "well known" IE error: it is not handling correctly content-Type multipart/form-data.
I didn't find any information about on the forum, am I the only one getting it with NodeBB?Thanks!
-
Guidance on creating a topic approval by category pluginHello!
I would also love this functinoality, hence I started developing it.
It is working, but I have no idea how to be able to edit the Admin Control Panel in order to set the categories I want to moderate (actually is an array).Any hint? Thanks in advance.
I think there is an "error" in the source code: the reputation is not taken in count....here below is better explained.
I post the code hoping to be helpful.I added two variables, the first defining the IDs of the Categories I wnat to moderate, the second (maybe it could be avoided) to store a boolean:
var queuedCategories = [1, 2]; var shouldReallyQueue;
Then I edited the Posts.shouldQueue = function (uid, data, callback) as it follows:
First, in the "const shouldQueue" I replaced the "0" with "meta.config.newbiePostDelayThreshold" (otherwise the reputation is not thaken in count):
const shouldQueue = meta.config.postQueue && (!userData.uid || userData.reputation < meta.config.newbiePostDelayThreshold || userData.postcount <= 0);Hence I added a new step in the async.waterfall:
function (result, next) { shouldReallyQueue = result.shouldQueue; if (result.data.tid !== undefined) topics.getTopicField(result.data.tid, 'cid', next); else plugins.fireHook('filter:post.shouldQueue', { categoryId : result.data.cid, shouldReallyQueue: shouldReallyQueue, }, next); },
editing the last check so:
next(null, result.shouldReallyQueue && (queuedCategories.indexOf(result.categoryId) > -1));
Hence, my "Posts.shouldQueue" looks now:
Posts.shouldQueue = function (uid, data, callback) { async.waterfall([ function (next) { user.getUserFields(uid, ['uid', 'reputation', 'postcount'], next); }, function (userData, next) { const shouldQueue = meta.config.postQueue && (!userData.uid || userData.reputation < meta.config.newbiePostDelayThreshold || userData.postcount <= 0); plugins.fireHook('filter:post.shouldQueue', { shouldQueue: shouldQueue, uid: uid, data: data, }, next); }, function (result, next) { shouldReallyQueue = result.shouldQueue; if (result.data.tid !== undefined) topics.getTopicField(result.data.tid, 'cid', next); else plugins.fireHook('filter:post.shouldQueue', { categoryId : result.data.cid, shouldReallyQueue: shouldReallyQueue, }, next); }, function (result, next) { next(null, result.shouldReallyQueue && (queuedCategories.indexOf(result.categoryId) > -1)); }, ], callback); };
-
[nodebb-plugin-beep] NodeBB Censor Curse Words PluginHello!
I am wondering where is the ACP link for this plugin.
I see I can edit the defaultBanList array in the index-js, but for what I am reading here above there should be a Administration link...but where?Thanks