Issue with categories : forums won't display the homepage anymore.


  • @baris Ah crap! I had all my hopes on this category thing.

    For now my nodebb forum in hosted on DigitalOcean but I'm the only one having fun with it for now.
    I had help from Nifty to export my old forum (mybb) onto my droplet. I was just cleaning up by setting up new categories, deleting some topics and I was about to set up a theme and plugins.

  • Gamers Anime Lovers

    If you have a public url that you can share post it maybe sockets aren't setup properly. Your browser console should give more info as well.

    Another way to confirm if your category data is good is to go to http://yourforum.com/api that should return all the categories on the homepage.


  • This post is deleted!

  • 2014-12-16T18:35:01.594Z - info: [hotswap] Router with id `plugins` replaced successfully
    2014-12-16T18:35:01.595Z - info: [plugins] All plugins reloaded and rerouted
    2014-12-16T18:35:01.609Z - info: [meta/css] Minifying LESS/CSS
    2014-12-16T18:35:01.611Z - info: NodeBB attempting to listen on: 0.0.0.0:4567
    2014-12-16T18:35:01.612Z - info: [hotswap] Router with id `auth` replaced successfully
    [cluster] Child Process (6026) listening for connections.
    2014-12-16T18:35:01.617Z - info: NodeBB is now listening on: 0.0.0.0:4567
    2014-12-16T18:35:01.667Z - info: [meta/templates] Compiling templates
    2014-12-16T18:35:02.020Z - info: [cluster] Client-side javascript and mapping propagated to worker 159
    2014-12-16T18:35:02.041Z - info: [sounds] Sounds OK
    2014-12-16T18:35:02.104Z - info: [cluster] Stylesheets propagated to worker 159
    2014-12-16T18:35:02.653Z - info: [meta/templates] Successfully compiled templates.
    2014-12-16T18:35:02.711Z - error: TypeError: Cannot read property 'parentCid' of null
        at /home/nodebb/nodebb/src/categories.js:427:31
        at Array.filter (native)
        at /home/nodebb/nodebb/src/categories.js:426:28
        at /home/nodebb/nodebb/node_modules/async/lib/async.js:249:17
        at /home/nodebb/nodebb/node_modules/async/lib/async.js:125:13
        at Array.forEach (native)
        at _each (/home/nodebb/nodebb/node_modules/async/lib/async.js:46:24)
        at async.each (/home/nodebb/nodebb/node_modules/async/lib/async.js:124:9)
        at _asyncMap (/home/nodebb/nodebb/node_modules/async/lib/async.js:248:13)
        at Object.map (/home/nodebb/nodebb/node_modules/async/lib/async.js:219:23)
    TypeError: Cannot read property 'parentCid' of null
        at /home/nodebb/nodebb/src/categories.js:427:31
        at Array.filter (native)
        at /home/nodebb/nodebb/src/categories.js:426:28
        at /home/nodebb/nodebb/node_modules/async/lib/async.js:249:17
        at /home/nodebb/nodebb/node_modules/async/lib/async.js:125:13
        at Array.forEach (native)
        at _each (/home/nodebb/nodebb/node_modules/async/lib/async.js:46:24)
        at async.each (/home/nodebb/nodebb/node_modules/async/lib/async.js:124:9)
        at _asyncMap (/home/nodebb/nodebb/node_modules/async/lib/async.js:248:13)
        at Object.map (/home/nodebb/nodebb/node_modules/async/lib/async.js:219:23)
    2014-12-16T18:35:02.712Z - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    2014-12-16T18:35:02.714Z - info: [app] Database connection closed.
    2014-12-16T18:35:02.714Z - info: [app] Web server closed to connections.
    2014-12-16T18:35:02.714Z - info: [app] Shutdown complete.
    [cluster] Child Process (6026) has disconnected
    [cluster] Child Process (6026) has exited (code: 1, signal: null)
    [cluster] Spinning up another process...
    2014-12-16T18:35:02.899Z - info: Time: Tue Dec 16 2014 13:35:02 GMT-0500 (EST)
    2014-12-16T18:35:02.903Z - info: Initializing NodeBB v0.5.7
    2014-12-16T18:35:02.903Z - info: * using configuration stored in: /home/nodebb/nodebb/config.json
    2014-12-16T18:35:02.903Z - info: * using mongo store at 127.0.0.1:27017
    2014-12-16T18:35:02.903Z - info: * using themes stored in: /home/nodebb/nodebb/node_modules
    2014-12-16T18:35:03.207Z - warn: You have no mongo password setup!
    2014-12-16T18:35:03.969Z - info: [user.startJobs] Registering User Jobs
    [cluster] Child Process (6047) listening for connections.
    
    2014-12-16T18:35:04.162Z - warn: [plugins/nodebb-plugin-mentions] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.
    2014-12-16T18:35:04.162Z - warn: [plugins/nodebb-plugin-mentions] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-mentions".
    
    
    2014-12-16T18:35:04.164Z - warn: [plugins/nodebb-widget-essentials] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.
    2014-12-16T18:35:04.164Z - warn: [plugins/nodebb-widget-essentials] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-widget-essentials".
    
    
    2014-12-16T18:35:04.166Z - warn: [plugins/nodebb-plugin-markdown] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.
    2014-12-16T18:35:04.166Z - warn: [plugins/nodebb-plugin-markdown] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-markdown".
    
    2014-12-16T18:35:04.685Z - info: [hotswap] Router with id `plugins` replaced successfully
    2014-12-16T18:35:04.685Z - info: [plugins] All plugins reloaded and rerouted
    2014-12-16T18:35:04.700Z - info: [meta/css] Minifying LESS/CSS
    2014-12-16T18:35:04.702Z - info: NodeBB attempting to listen on: 0.0.0.0:4567
    2014-12-16T18:35:04.703Z - info: [hotswap] Router with id `auth` replaced successfully
    [cluster] Child Process (6047) listening for connections.
    2014-12-16T18:35:04.709Z - info: NodeBB is now listening on: 0.0.0.0:4567
    2014-12-16T18:35:04.788Z - info: [meta/templates] Compiling templates
    2014-12-16T18:35:05.055Z - info: [sounds] Sounds OK
    2014-12-16T18:35:05.083Z - info: [cluster] Client-side javascript and mapping propagated to worker 160
    2014-12-16T18:35:05.142Z - info: [cluster] Stylesheets propagated to worker 160
    2014-12-16T18:35:05.688Z - info: [meta/templates] Successfully compiled templates.
    2014-12-16T18:35:08.908Z - info: [meta/css] admin.css committed to disk.
    2014-12-16T18:35:10.836Z - info: [meta/css] stylesheet.css committed to disk.
    2014-12-16T18:35:13.432Z - info: [meta/js] Minification complete
    2014-12-16T18:35:13.523Z - info: [meta/js] Client-side minfile and mapping committed to disk.
    2014-12-16T18:35:13.523Z - info: NodeBB Ready
    
  • Gamers Anime Lovers

    Can you post the output of the following

    db.objects.find({_key:"category:2"}).pretty();
    db.objects.find({_key:"category:3"}).pretty();
    db.objects.find({_key:"category:11"}).pretty();
    db.objects.find({_key:"category:12"}).pretty();
    db.objects.find({_key:"category:13"}).pretty();
    db.objects.find({_key:"category:14"}).pretty();
    db.objects.find({_key:"category:15"}).pretty();
    

    Any of those empty?


  • {
            "_id" : ObjectId("547e1db2f303ddd981c99acf"),
            "_imported_cid" : 1,
            "_imported_description" : "No decsciption available",
            "_imported_name" : "WotW Lounge",
            "_imported_parentCid" : "",
            "_imported_path" : "",
            "_imported_slug" : "",
            "_key" : "category:2",
            "bgColor" : "#004c66",
            "cid" : 2,
            "class" : "col-md-3 col-xs-6",
            "color" : "#FFFFFF",
            "description" : "Soirées de l'ambassadeur, Ferro Rocher fournis",
            "disabled" : 0,
            "icon" : "fa-comment",
            "imageClass" : "cover",
            "link" : "",
            "name" : "Da Lounge",
            "numRecentReplies" : 1,
            "order" : "1",
            "parentCid" : 0,
            "post_count" : 53261,
            "slug" : "2/da-lounge",
            "topic_count" : 23
    }
    {
            "_id" : ObjectId("54902fe6e0b2fdca2defe7f6"),
            "_key" : "category:3",
            "order" : "4"
    }
    {
            "_id" : ObjectId("548ec825e0b2fdca2def493a"),
            "_key" : "category:11",
            "cid" : 11,
            "name" : "Da Jeux Vidéos",
            "description" : "Là où Mario rencontre Sally",
            "icon" : "fa-gamepad",
            "bgColor" : "#0059b2",
            "color" : "#fff",
            "slug" : "11/da-jeux-vidéos",
            "parentCid" : 0,
            "topic_count" : 27,
            "post_count" : 17845,
            "disabled" : 0,
            "order" : "4",
            "link" : "",
            "numRecentReplies" : 1,
            "class" : "col-md-3 col-xs-6",
            "imageClass" : "cover"
    }
    {
            "_id" : ObjectId("548ecae1e0b2fdca2def493d"),
            "_key" : "category:12",
            "cid" : 12,
            "name" : "Les News",
            "description" : "L'information décryptée puis recryptée en pire",
            "icon" : "fa-area-chart",
            "bgColor" : "#0059b2",
            "color" : "#fff",
            "slug" : "12/les-news",
            "parentCid" : 0,
            "topic_count" : 33,
            "post_count" : 1121,
            "disabled" : 0,
            "order" : "3",
            "link" : "",
            "numRecentReplies" : 1,
            "class" : "col-md-3 col-xs-6",
            "imageClass" : "auto"
    }
    

    A part from the first two, the others are normal like category 11 and 12, here above. And thanks for your help!

  • Gamers Anime Lovers

    Looks like category 3 is the problem.

    Make a backup of your database and remove it with

    db.objects.remove({_key:"category:3"});
    db.objects.remove({_key:"categories:cid", value: "3"});
    

  • It worked like a charm!
    Thanks so much for your help. I could hug you!

    Here's a little Christmas gift (an Advent calendar): http://www.legrugru.com/avent/

  • Gamers Anime Lovers

    Lol that should have a NSFW tag 🙂


  • Thanks again, mate!

Suggested Topics

| |