3.6.0 Upgrade Support
-
B baris unpinned this topic on
-
@baris I had 3.6.5 installed, no problem. All other updates from that version up, break my website. updating to 3.6.6 works. 3.6.7 breaks my install.
upgrade does not report any problem
Build does not report any problem,
nodebb dev gets stucked2024-05-28T13:55:23.815Z [4567/4384] - verbose: [plugins/fireHook] filter:sanitize.config
2024-05-28T13:55:23.816Z [4567/4384] - info: [plugins] Plugins OK
2024-05-28T13:55:23.816Z [4567/4384] - verbose: [plugins/fireHook] static:assets.prepare
2024-05-28T13:55:23.817Z [4567/4384] - verbose: [plugins/fireHook] static:app.preload
2024-05-28T13:55:23.817Z [4567/4384] - verbose: [plugins/fireHook] filter:router.add
2024-05-28T13:55:23.819Z [4567/4384] - verbose: [plugins/fireHook] static:app.load
2024-05-28T13:55:23.823Z [4567/4384] - verbose: [plugins/fireHook] filter:settings.get
2024-05-28T13:55:23.828Z [4567/4384] - verbose: [plugins/fireHook] filter:settings.get
-- stops here, no error, nothing, but does not work----the nodebb updates comparison here
https://github.com/NodeBB/NodeBB/compare/v3.6.5...v3.6.7
I've noticed that if I undo the updates on src/plugins/hooks.js the nodebb starts to work again.
Any idea what can I do on my custom theme/plugins to fix it? -
@baris thanks for the help. I'm going through all the static: hooks used in custom theme and plugins, and noticed some difference on how some of them are coded. Maybe this is the problem? some have like a next() or callback() function at the end. Can this be the issue? I see that the example you show to me doesn't have the callback / next function at the end.
example one (not calling callback)
{ "hook": "static:app.load", "method": "init" }, plugin.init = async function (data) { const controllers = require('./controllers'); SocketPlugins.composer = socketMethods; data.router.get('/admin/plugins/composer-default', data.middleware.admin.buildHeader, controllers.renderAdminPage); data.router.get('/api/admin/plugins/composer-default', controllers.renderAdminPage); };
example two (calling callback)
{ "hook": "static:app.load", "method": "init" }, exports.init = ({ router, middleware }, callback) => { router.get('/admin/plugins/cdn', middleware.admin.buildHeader, renderAdmin); router.get('/api/admin/plugins/cdn', renderAdmin); router.get('/api/admin/plugins/cdn/save', (req, res, next) => { setObject('plugin_cdn:settings', JSON.parse(req.query.settings), (err) => { if (err) { next(err); return; } res.sendStatus(200); }); }); callback(); };
-
I got a lot of custom plugins with that old callback function. I think that is the issue. One example is from
nodebb-plugin-cdn
I have a custom version of it (dont ask why....)I can see that the latest update
https://github.com/NodeBB/nodebb-plugin-cdn/commit/186a98f1df60309ae4dcc4338bf6c0c15a025de3
in the exports.preLoad , they had the callback before, and in the current lastest version, that is not there anymore. -
After recoding all the static callback issues, website is working again. Thanks for the help.