nodebb-plugin-category-sections - ACP still broken
-
@Jason-Neal the plugin is not updated for NodeBB v1.0. There was a change in NodeBB v1.0 related to ACP scripts for plugins.
Sent a PR to make it compatible with NodeBB v1.x.x
In the mean time to make the ACP work, change this line
https://github.com/NodeBB/nodebb-plugin-category-sections/blob/master/plugin.json#L24
replace
"scripts"
with"acpScripts"
and then restart NodeBB. -
@pichalite, my test board seems to crash when this plugin is activated now.
Issues I noticed:
- Making the change in your PR to the plugin.json allowed the use of the buttons in the ACP
- Trying to add more than one category and hitting save resulted in content a message reading "ERR" being shown
- After disabling the plugin and re-enabling it, the board crashes as soon as it is activated.
As soon as I try to open category sections from within the ACP
17/3 16:27 [14512] - verbose: [plugins] Loading templates (nodebb-plugin-category-sections) 17/3 16:27 [14512] - verbose: [meta/templates] Compiling templates 17/3 16:27 [14512] - verbose: [meta/templates] Successfully compiled templates. 17/3 16:27 [14512] - error: SyntaxError: Unexpected token o at Object.parse (native) at Command.callback (/root/nodebb/node_modules/nodebb-plugin-category-sections/library.js:71:53) at RedisClient.return_reply (/root/nodebb/node_modules/redis/index.js:664:25) at JavascriptReplyParser.reply_parser.send_reply (/root/nodebb/node_modules/redis/index.js:332:14) at JavascriptReplyParser.run (/root/nodebb/node_modules/redis/lib/parsers/javascript.js:132:18) at JavascriptReplyParser.execute (/root/nodebb/node_modules/redis/lib/parsers/javascript.js:107:10) at Socket.<anonymous> (/root/nodebb/node_modules/redis/index.js:131:27) at Socket.emit (events.js:95:17) at Socket.<anonymous> (_stream_readable.js:764:14) at Socket.emit (events.js:92:17) SyntaxError: Unexpected token o at Object.parse (native) at Command.callback (/root/nodebb/node_modules/nodebb-plugin-category-sections/library.js:71:53) at RedisClient.return_reply (/root/nodebb/node_modules/redis/index.js:664:25) at JavascriptReplyParser.reply_parser.send_reply (/root/nodebb/node_modules/redis/index.js:332:14) at JavascriptReplyParser.run (/root/nodebb/node_modules/redis/lib/parsers/javascript.js:132:18) at JavascriptReplyParser.execute (/root/nodebb/node_modules/redis/lib/parsers/javascript.js:107:10) at Socket.<anonymous> (/root/nodebb/node_modules/redis/index.js:131:27) at Socket.emit (events.js:95:17) at Socket.<anonymous> (_stream_readable.js:764:14) at Socket.emit (events.js:92:17)
-
@ThingBreaker may be there is some error if using Redis as DB. I have no problems running it using Mongo.
Will try to spin a new instance using Redis and see if it works.
-
@pichalite, I'd be curious to hear your results. I haven't worked with mongo previously though it seems to be the new standard for NodeBB installations.
-
@ThingBreaker I am getting the same error if I use Redis. not sure what the fix is...
-
@ThingBreaker I think I found a fix for this...
remove existing plugin settings from Redis (if any saved)
connect to redis using
redis-cli
and runDEL plugins:category-sections:sections
to remove any saved settingsadd the following code before this line https://github.com/NodeBB/nodebb-plugin-category-sections/blob/master/static/lib/admin/sections.js#L66
sections = JSON.stringify(sections);
restart NodeBB
-
I have to say, I'm loving the active community here for NodeBB. Reminds me of when SMF was still pretty new.
Would it help if I forked the repository, made the fix and asked for a pull into the master?
Not sure about the order of operations expected here in the community.
-
@Jason-Neal already sent the PR to the repository. no need to do it again.
-
@Jason-Neal @ThingBreaker new version of plugin published with compatibility for NodeBB v1.x.x and fix for settings save when using redis.
-
@pichalite You're awesome man.
Very excited about nodebb and what it can do.
I look forward to becoming an active part of the community here.
Kudos to @psychobunny for all of the AWESOME plugins he's developed here too!
-
Don't think starting a new topic is necessary for my question - is this only compatible with Lavender and if not is there a way of doing this with Persona?
-
@Danny-McWilliams said:
is this only compatible with Lavender and if not is there a way of doing this with Persona?
seems to be compatible with persona, but I haven't tried it
https://github.com/NodeBB/nodebb-plugin-category-sections/blob/master/library.js#L136 -
@phit @Danny-McWilliams plugin used to support persona but recent changes to persona/templates.js made it incompatible.