Purge Category Issue - 502 Bad Gateway

Technical Support
  • Purging a category caused the following error. Categories list no lonnger loads.

    Now the log shows this error.

    system details

    NodeBB - v1.0.3
    Ubuntu 14.04.04 LTS
    Nginix

    5/5 13:50 [2606] - error: TypeError: Cannot read property 'children' of undefined
    at Object.helpers.generateChildrenCategories (/var/www/nodebb/public/src/modules/helpers.js:107:11)
    at callMethod (/var/www/nodebb/node_modules/templates.js/lib/templates.js:279:17)
    at parseFunctions (/var/www/nodebb/node_modules/templates.js/lib/templates.js:303:55)
    at parseArrayBlock (/var/www/nodebb/node_modules/templates.js/lib/templates.js:380:14)
    at parseArray (/var/www/nodebb/node_modules/templates.js/lib/templates.js:346:13)
    at parse (/var/www/nodebb/node_modules/templates.js/lib/templates.js:416:16)
    at parseTemplate (/var/www/nodebb/node_modules/templates.js/lib/templates.js:133:14)
    at Object.templates.parse (/var/www/nodebb/node_modules/templates.js/lib/templates.js:119:11)
    at /var/www/nodebb/node_modules/templates.js/lib/templates.js:169:30
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
    TypeError: Cannot read property 'children' of undefined
    at Object.helpers.generateChildrenCategories (/var/www/nodebb/public/src/modules/helpers.js:107:11)
    at callMethod (/var/www/nodebb/node_modules/templates.js/lib/templates.js:279:17)
    at parseFunctions (/var/www/nodebb/node_modules/templates.js/lib/templates.js:303:55)
    at parseArrayBlock (/var/www/nodebb/node_modules/templates.js/lib/templates.js:380:14)
    at parseArray (/var/www/nodebb/node_modules/templates.js/lib/templates.js:346:13)
    at parse (/var/www/nodebb/node_modules/templates.js/lib/templates.js:416:16)
    at parseTemplate (/var/www/nodebb/node_modules/templates.js/lib/templates.js:133:14)
    at Object.templates.parse (/var/www/nodebb/node_modules/templates.js/lib/templates.js:119:11)
    at /var/www/nodebb/node_modules/templates.js/lib/templates.js:169:30
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
    5/5 13:50 [2606] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    5/5 13:50 [2606] - info: [app] Database connection closed.
    5/5 13:50 [2606] - info: [app] Web server closed to connections.
    5/5 13:50 [2606] - info: [app] Shutdown complete.
    [cluster] Child Process (2606) has exited (code: 1, signal: null)
    [cluster] Spinning up another process...

  • Should be fixed in master and 1.x.x can you update and try again.

    Were there any errors when you purged the category?

  • Thanks! The upgrade from master fixed the issue.

    Sorry could not capture the error logs. But the issue was caused upon adding a new child category it showed duplicate child categories and upon deleting the duplicates it caused the issue. Hope this helps.

  • 0_1462532049205_vapeindia.png

    After the upgrade now we have 2 zombie categories. Anyway to remove that?

    These are not shown in admin only in categories list.

    thanks

  • Having the same issue as well! I am going to go ahead and upgrade to master, as well.

  • Do you have reproduction steps to cause duplicate categories? And does it happen on master?

  • Sorry. I don't have specific reproduction steps . No it does not happen after the master upgrade. Now i am facing another issue part from the zombie categories. If i create new category and inherit from existing category it does not show in front end and shows only in the admin categories list.

  • If your forum is public post a link to it so we can take a look.

  • It is not a public forum. 😞

  • I updated to master and made the most recent pulls.

    I also have 2 empty ghost categories

  • @h0lybyte Which database are you using? You can remove the ghost categories from the correct sorted set to get rid of them.


Suggested Topics


  • 0 Votes
    6 Posts
    715 Views
  • Removing All categories

    Technical Support
    0 Votes
    1 Posts
    194 Views
  • Help, 502 bad gateway

    Technical Support
    1 Votes
    2 Posts
    220 Views
  • Issue domain name

    Technical Support
    0 Votes
    4 Posts
    1391 Views
  • 2 Votes
    10 Posts
    4977 Views