1.15.0 Breaking Changes
-
NodeBB no longer supports NodeJS 8 and below!
Please see the following issues for breaking changes to plugins and themes.
- https://github.com/NodeBB/NodeBB/issues?q=is%3Aissue+milestone%3A1.15.0+label%3A"breaking+change+(plugins)"+is%3Aclosed
- https://github.com/NodeBB/NodeBB/issues?q=is%3Aissue+milestone%3A1.15.0+is%3Aclosed+label%3A"breaking+change+(themes)"
- https://github.com/NodeBB/NodeBB/pull/8512
If you have plugins that are affected, please update your plugin and add the below to your package.json
"nbbpm": { "compatibility": "^1.15.0" }
-
The following hooks were deprecated and are removed in 1.15.0.
filter:file.isFileTypeAllowed
removed, usefilter:image.isFileTypeAllowed
instead
filter:controllers.topic.get
removed, usefilter:topic.build
instead
filter:user.account
removed usefilter:account/profile.build
filter:user.account.edit
removed, usefilter:account/edit.build
filter:notifications.get
removed, usefilter:notifications.build
https://github.com/NodeBB/NodeBB/commit/4eae927d14d82ed26c78a4f4d8a35faa8369255a
-
utils.walk
was deprecated and removed in 1.15.0, usefile.walk
instead.feat: remove deprecated utils.walk · NodeBB/NodeBB@609e37a
Node.js based forum software built for the modern web - feat: remove deprecated utils.walk · NodeBB/NodeBB@609e37a
GitHub (github.com)
-
/assets/stylesheet.css
route was deprecated and removed in 1.15.0. If you have a theme that is still using this change it to/assets/client.css
for the front end and/assets/admin.css
for the ACP. https://github.com/NodeBB/NodeBB/commit/762b0be4b4744abef16873abd08cca2133bb159b -
Requiring core modules with
module.parent.require()
will not work if the path to the module is not correct. Please userequire.main.require("./src/<module_name>")
instead which will work regardless of where you source file is in the plugin folder structure. https://github.com/NodeBB/NodeBB/commit/303bffdb5f7e7e048c4e019f128b3a42c9362aa8 -
The method signature of
Flags.list()
has changed. Instead of(filters<object>, uid<int>)
, it now takes a single object parameter, with valid properties beingfilters
,uid
, andsort
-
This effects custom themes.
https://github.com/NodeBB/NodeBB/issues/8615The necessary changes are in this commit to persona theme. https://github.com/NodeBB/nodebb-theme-persona/commit/4dcc9fad23eed806604397292a2d8117f1052320
-
sounds removed https://github.com/NodeBB/NodeBB/pull/8617
app.isConnected
has been removed, usesocket.connected
instead.
app.template
has been removed, useajaxify.data.template.name
instead
window.templates
global has been removed, use benchpress by requiring it as a module.
RELATIVE_PATH
global has been removed, usedconfig.relative_path
instead -
utils.slugify
deprecated in 1.15.0, will be removed in 1.16.0. Use theslugify
module that will be available in 1.15.0.Client side
require(['slugify'], function (slugify) { console.log(slugify('string to slugify')); });
Server side
const slugify = require.main.require('./src/slugify'); console.log(slugify('string to slugify'));
-
The Write API plugin has been merged into core NodeBB and given the prefix
/v3
. The pre-existing write-api plugin should still work with NodeBB v1.15.x (and/v2
will be entering maintenance), but development will continue on/v3
Breaking and Non-Breaking changes
- Not Breaking
POST /api/v1/users | admin.user.createUser
- The POST route will now return a complete user object (a call to User.getUserData is made with the new uid)
- Not Breaking
PUT /api/v1/users/:uid | SocketUser.changeUsernameEmail | SocketUser.updateProfile
- The PUT route will now return a complete user object (like above)
- Breaking
DELETE /api/v1/users | DELETE /api/v1/users/:uid | admin.user.deleteUserAndContent
- The new
DELETE
route will now not return anything in response
- The new
- Breaking
PUT /api/v1/categories/:cid | admin.categories.update
- The new
PUT
route will return the updated category object, instead of simply the cid that was updated
- The new
- Breaking
POST /api/v1/groups | admin.groups.create
- The
POST
route will now return a complete group object (a call to Groups.getGroupData is made with the new group name) ownerUid
, previously returned, will now no longer be present in the response
- The
- Breaking
PUT/DELETE /api/v1/groups/:slug/membership
- Updated to be
PUT/DELETE /api/v1/groups/:slug/membership/:uid
, to better conform with RESTful API design (it takesuid
as a route param now) - Admin-only Write API routes for group addition/removal have been merged into this one route
- Updated to be
- Not Breaking
POST /api/v1/topics/:tid | posts.reply
- The
POST
route will now return a complete post summary object instead of a smaller subset as before
- The
- Not Breaking
PUT /api/v1/posts/:pid
- The
PUT
route will now return a complete post summary object instead of a smaller subset as before
- The
- Breaking
api/v1/categories/:cid/privileges
route has been removed in favour ofapi/v3/users/:uid/privileges
andapi/v3/groups/:name/privileges
- Breaking
api/v1/categories/:cid/state
removed as category disabled state is slated for removal in a future version of NodeBB - Breaking
api/v2/util/maintenance
is renamedapi/v3/admin/settings
and now allows modification of all ACP settings - Breaking
api/v2/util/upload
is renamedapi/v3/files/upload
- Not Breaking
-
@baris said in 1.15.0 Breaking Changes:
utils.slugify
deprecated in 1.15.0, will be removed in 1.16.0. Use theslugify
module that will be available in 1.15.0.Client side
require(['slugify'], function (slugify) { console.log(slugify('string to slugify')); });
Server side
const slugify = require('slugify'); console.log(slugify('string to slugify'));
Hello @baris !
I began to upgrade nodebb from 1.14 to 1.15 and, when I use these changes for slugify in my plugins, I get this error :
2020-12-11T14:23:34.787Z [5678/37554] - error: Error: Cannot find module 'slugify'
These changes for slugify are for nodebb 1.15 or nodebb 1.16 ? Or is it something else that I must do to make it works right ?