Upgraded NodeBB To V1.4.2 Errors

Technical Support
  • Hi There,

    I upgraded my version of both Node.Js and NodeBB to 6.9 and 1.4.2 respectively.

    I encountered a variety of problems that I needed to get my head around.

    The forum is SSL only, and load balanced using NGINX.

    /var/www/nodebb/public/src/modules/helpers.js

    This file here was accessing
    data.config.loggedIn

    When data.config was undefined. So obviously NPE and crashed.

    I added

    if(properties && data.config)

    To mitigate this problem.

    Once this had been sorted, I then was able to reach my forum, but none of the pages would load.

    After looking at this I noticed NodeBB was serving up pages from / then appending the config.json url then the path.

    Obviously this led to:

    /https://www.example.com/path/to/resource

    This didn't exist and thus NPE crash.

    So hackily I've set my URL to /.

    So now resources look like they are being referenced, albeit hackily ///path/to/resource

    Is this a bug, or is this something I have set up incorrectly.

    I've posted this here so that others can find it if they need to.

    Kind regards,

    Calum

  • @Calum122 post your config.json and Nginx config

  • @pichalite Thank you for the response.

    That was most peculiar, but I reset the config.json to be how it was and it stopped having this error.

    Besides I still think it's best to check data.config, before extracting data.config.loggedin anyway.


Suggested Topics