0.6.0 Breaking Changes
-
Hook changes
Static
static:app.load
change see this thread
Filter
filter:post.parse
,filter:post.parseSignature
see this threadfilter:uploadImage
,filter:uploadFile
see this threadfilter:category.get
change see this commitfilter:register.build
change see this commitfilter:register.check
change see this commitfilter:register.complete
change see this commitfilter:post.getFields
change see this commitfilter:post.setFields
change see this commit
Action
action:topic.save
,action:topic.edit
,action.topic.restore
see this threadaction:user.set
change see this comitaction:user.verify
change see this commitaction:post.purge
andaction:topic.purge
see this commit
Key renames
'categories:' + cid + ':tid'
renamed to'cid:' + cid + ':tids'
'cid:' + cid + ':uid:' + uid + ':tid'
renamed to'cid:' + cid + ':uid:' + uid + ':tids'
'categories:recent_posts:cid:' + cid
renamed to'cid:' + cid + ':pids'
Widgets
- Recent Replies widget has been deprecated, it will no longer render anything please use the Recent Posts widget instead.
config.json
header.tpl
- Please see this thread
TBD
-
Haha yeah we will put all the breaking changes that will happen in 0.6.0 as we commit them. There will be some changes to some plugin hooks.
-
Haha yeah we will put all the breaking changes that will happen in 0.6.0 as we commit them. There will be some changes to some plugin hooks.
-
Updated with
filter:post.parse
andfilter:post.parseSignature
changes. Thread for reference https://community.nodebb.org/topic/3039/filter-post-parse-and-filter-post-parsesignature-changes -
@a_5mith ^ That change probably broke a lot of your plugins.
If you are updating any of them, you should add a new section into
package.json
:{ ... "nbbpm": { "compatibility": "^0.6.0" } }
NodeBB doesn't read that value yet, but it will soon.
-
Yay.
Will do. I noticed @baris offered a PR on one of my plugins, I'll take a look when I'm slightly more awake, had a 4 hour interview today including full competency exam. I'm knackered.
List of affected plugins will be marked as I've updated them in npm.
Youtube Lite (Updated)
Mixcloud (Updated)
My Custom Soundcloud Plugin
Vine
Flipkart
Codepen
Beat.TV
Beatport
Embed.ly
JotForm
Twitch.TV
Vexflow
jsFiddle
Spotify(PR)
Slideshare
HearThis.atLe sigh. Much plugins, very work.
-
Updated with key renames, related issue https://github.com/NodeBB/NodeBB/issues/2356.
@a_5mith you should also move the regular expressions out of the .parse function while you are updating.
-
Updated with key renames, related issue https://github.com/NodeBB/NodeBB/issues/2356.
@a_5mith you should also move the regular expressions out of the .parse function while you are updating.
-
Updated with hook changes to
action:topic.save
,action:topic.restore
andaction:topic.edit
.Related thread https://community.nodebb.org/topic/3153/action-topic-save-action-topic-restore-action-topic-edit-changes
Related GH issue https://github.com/NodeBB/NodeBB/issues/2357
-
filter:category.get
parameters changed, related commit
https://github.com/NodeBB/NodeBB/commit/db979d7a20acb93ed1961f2c3579e2ed660bf89e@trevor I know this affects one of the plugins that you use.
-
Two new hooks
action:post.purge
andaction:topic.purge
. Relevant commit https://github.com/NodeBB/NodeBB/commit/f9f1cf63cf9f46dfc2c4a0d64139efbe09873638 -
So with most (all?) multi-argument hooks being updated to use a single data object, what will become of the single argument hooks? Will they get the same treatment with in mind that more data can be added later?
Sorry if this has been discussed before, must've missed it.
-
Ideally we should change those to be objects as well so we don't have to do this amount of breaking changes in the future. Ie stuff like
plugins.fireHook('action:post.delete', pid);
Should be
plugins.fireHook('action:post.delete', {pid: pid, uid:uid});
There aren't alot of these as far as I know so I will make a list and let you all know about the changes here when they happen.
-
@baris I thought we were leaving the single-argument hooks as-is for now? I don't mind changing it, though... may as well get it all over in one go.
-
Recent Replies widget is deprecated please switch over to Recent Posts widget if you were using it. It has the same functionality.
-
Updated with link to config changes. https://community.nodebb.org/topic/3392/config-json-updated-base_url-and-relative_path-no-longer-exist