NodeBB-Community / nodebb-plugin-custom-pages

Allows you to add as many new pages as you like to your NodeBB forum
BSD 2-Clause "Simplified" License
39 stars 24 forks source link

Plugin crashes process on save settings #50

Closed Radiergummi closed 7 years ago

Radiergummi commented 7 years ago

After upgrading from 0.3.5 to 0.5.2, I can't save the settings anymore. I tried to do so because I experienced another error: All my pages have an empty Restrict access to groups field, yet are not publicly accessible (redirected to login).

15/9 10:20:25 [1729] - error:  TypeError: widgets.resetTemplates is not a function
    at resetWidgets (/var/www/node/nodebb/node_modules/nodebb-plugin-custom-pages/library.js:274:10)
    at SocketAdmin.settings.saveCustomPages (/var/www/node/nodebb/node_modules/nodebb-plugin-custom-pages/library.js:200:3)
    at async.waterfall.err.message (/var/www/node/nodebb/src/socket.io/index.js:144:4)
    at nextTask (/var/www/node/nodebb/node_modules/async/dist/async.js:5273:14)
    at next (/var/www/node/nodebb/node_modules/async/dist/async.js:5280:9)
    at /var/www/node/nodebb/node_modules/async/dist/async.js:906:16
    at /var/www/node/nodebb/src/socket.io/admin.js:50:12
    at nextTask (/var/www/node/nodebb/node_modules/async/dist/async.js:5273:14)
    at Immediate.next (/var/www/node/nodebb/node_modules/async/dist/async.js:5280:9)
    at Immediate._onImmediate (/var/www/node/nodebb/node_modules/async/dist/async.js:906:16)
    at runCallback (timers.js:785:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
15/9 10:20:25 [1729] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
15/9 10:20:25 [1729] - info: [app] Database connection closed.
15/9 10:20:25 [1729] - info: [app] Web server closed to connections.
15/9 10:20:25 [1729] - info: [app] Shutdown complete.
[cluster] Child Process (1729) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
psychobunny commented 7 years ago

Hi, this requires the latest version of NodeBB (1.6.0), though you can safely git cherry-pick the following commit if you're at 1.5.x and don't want to upgrade just yet: https://github.com/NodeBB/NodeBB/commit/01275787b67bd46adf6c06c1afae36b91fecc391

(Or downgrade the plugin)

As for this issue:

yet are not publicly accessible (redirected to login).

Fixing this shortly

psychobunny commented 7 years ago

Actually, the last issue was fixed in the latest version of this plugin (0.5.3), I just verified it again to double check