I'm running an educational forum (https://szkolnecentrum.pl), and, in the first place, I would like to change the names of particular elements. For example, instead of "topic" or "post", I would like to name it "task", "assignment", "answer" or anything like this. More importantly, there is an issue connected to one of the plugins and some part of HTML can be seen in notifications (screen below).
mistake.png
The plugin which is responsible for that error is called nodebb-plugin-question-and-answer-pl (all the plugins don't work except the Chinese one, that's why I would also like to access HTML and try changing it).
Old/Bad Category CID somehow stuck in nodeBB cache. How to clear?
-
Thank you for this amazing platform. I ran into an unusual issue where I have a category CID coming back from the cache and I have no reference to it anywhere within any of the collections on the mongo database.
I have attemtped to trace this back to the cache library and tried to perform a cache reset also. I have also re-build all assets with ./nodebb build. Where can I clear this bogus cid. Its crashing the entire server and I need to clear it.
For now I just added a temporary filter on the cids array to manually remove it and this is temporarily fixing my problem and allowing nodebb server to start and operate fine.
Before I do any more review of the codebase, I was wondering if I am just missing something.
So for example the cids will come back as:
[ '1', '2', '3', '4' ]
'4' is bad cid. It is non-existant and must be removed from cache. This '4' does not exist in database and causes nodebb to crash.
I cannot clear '4' cid from cache.
So my temporary fix is to do
.filter(cid => cid !== '4') // This is fixing for now.
https://github.com/NodeBB/NodeBB/blob/master/src/categories/index.js#L87
Categories.getAllCidsFromSet = function (key, callback) { const cids = cache.get(key); // ... })
Any advice I greatly appreciate!