Plugin search not working properly in v4.0 beta
-
I'm running a new install of NodeBB v4.0.0-beta.2 (it's the first time I've used NodeBB).
The plugin search in the admin isn't working properly. It only searches the plugins that are already visible on the active tab – eg the Trending tab or the Find Plugins tab. There's no way to search for plugins that don't appear by default on one of those tabs (10 plugins on the former, 19 on the latter, with partial overlap).
When I wanted to installnodebb-plugin-sso-facebook
, for instance, I had to use NPM because I couldn't access it from the admin UI.The Trending tab also includes outdated plugins that haven't been updated in many years, but that's unrelated I guess.
-
It's been a while since I looked at that code but the find plugins tab might have displayed all the plugins at some point hence the search only working on the local page. Maybe that got removed since there were 1400 plugins on npm last I checked. We will have to change the search there to find all plugins since acp shows plugins that are marked compatible with your nodebb.
-
/admin/extend/plugins find plugins tab should search all plugins · Issue #12824 · NodeBB/NodeBB
right now only searches what's on the page from https://community.nodebb.org/topic/18310/plugin-search-not-working-properly-in-v4.0-beta
GitHub (github.com)
-
@caesar ok so I dug into the code a bit and found out what's going on. When you load that page the
Find Plugins
tab is populated by plugins that are marked compatible with your nodebb version. The list is generated by this url https://packages.nodebb.org/api/v1/plugins?version=3.9.1. Since you were onNodeBB v4.0.0-beta.2
there is probably not a lot of plugins marked compatible. For reference above url returns 185 plugins and the acp let's you search in those. It doesn't search npm and display potentially incompatible plugins. -
@baris Ohhh ok. Thanks for investigating! That makes sense, but also maybe it would be good to be able to disable that filter? After all plugins could be compatible but not have been updated to specify compatibility. It could show a warning that the plugin isn't known to be compatible.
-
@baris In fact, all of the plugins that are shown have this warning:
This plugin has no compatibility data, make sure it works before installing on your production environment.
So especially for a beta, also (optionally) showing ones that have compatibility data but don't include the latest version could be useful and could be labelled in a similar way.
-
https://github.com/NodeBB/NodeBB/issues/12824 · NodeBB/NodeBB@c4a60db
Node.js based forum software built for the modern web - https://github.com/NodeBB/NodeBB/issues/12824 · NodeBB/NodeBB@c4a60db
GitHub (github.com)
With this change, doing a search on the
Find Plugins
tab will show all matches, looks like all the plugins were already available inajaxify.data.incompatible
so it will search in that array too.