1.7.0 Breaking Changes

NodeBB Development

Suggested Topics

  • 3 Votes
    2 Posts

    As of v1.4.4 nconf.get('upload_path'); is no longer a relative path pointing to the uploas directory, it is now an absolute path to the uploads directory. Change introduced in commit aaacdb8413c9bc3f3d47c249c0d0287eac1cad88

  • 5 Votes
    1 Posts

    Related issue https://github.com/NodeBB/NodeBB/issues/4587

    As discussed in the issue, we had a bunch of hooks to modify a page on some routes like filter:recent.build. These were added as required but most pages didn't have a hook so if you needed one you would have to ask us to add it and wait for the next release. With the above change every route has a hook. The hook name is derived from the template name passed to the res.render(template, data); method. For example if your template is named myAwesomePage, you render it with res.render('myAwesomePage', data); and the hook that will be fired is filter:myAwesomePage.build

    Every hook gets 3 parameters {req: req, res: res, templateData: data}, data is the parameter you pass into the res.render method.

    We had a few inconsistencies in the parameters passed to the hook and the hook name below are the changes that needs to be fixed if you have a plugin that is listening to these hooks.

    filter:groups.build is now called filter:group/details.build as that is the correct name for that template. filter:popular.build used to pass in a extra term parameter, this moved into the templateData parameter. filter:header.build this is removed it was deprecated a while ago. Use filter:navigation.available instead. filter:search.build parameters changed, data is no longer passed in use req.query and req.params instead. results is now the templateData parameter.

    Feel free to ask any questions if anything isn't clear.

  • 0 Votes
    3 Posts

    But... It's a breaking change.
    You should not do such stuff when you have now 1.0

  • 0 Votes
    2 Posts

    Are you using the custom-page plugin?

    It seems rbeer fork might fix this, otherwise you have to copy the template manually as leksar says.

    Also, if you're talking about hand coding the template in the public directory, those are always deleted on restart. The template in the plugin's template folder is what should be modified.

    But I'm also having other issues with custom-pages, so I'm not even sure if that works tbh.

  • 4 Votes
    13 Posts

    I want to escape by default, to prevent accidental XSS. If you intentionally want to allow scripts then you should use double curly brackets

    I think its something I would rather break today than worry about it in future