Thank you so much. And I spent my afternoon debugging this, feeling so stupid right now
D
ducntq
@ducntq
Posts
-
Register a hook but lose another hook -
Register a hook but lose another hookOkay, so I'm experiencing something weird here.
First thing first, my repo: https://github.com/ducntq/nodebb-theme-devmonkeeI got 2 hooks in my plugin.json:
"hook": "filter:privileges.topics.get", "method": "onGetTopicPrivSettings", "hook": "static:api.routes", "method": "addRoutes"
These hooks are served by
/lib/theme.js
.
The problem is:- If I register
static:api.routes
, the hookfilter:privileges.topics.get
will not register. - If I don't register
static:api.routes
(aka remove fromplugin.json
),filter:privileges.topics.get
will be registered.
Can someone please tell me what's going on? Why can't I register both
static:api.routes
andfilter:privileges.topics.get
? - If I register