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
-
@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 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
-
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.
-