Sort by Newest to Oldest Question

General Discussion
  • Hello again,

    I have my topics sorted by Newest to oldest and it seem that a new post (say its one hour old) will be positioned below an older post (say 1 week old) if the oldest post has a more recent last reply date (in this case the newest post has no replies since its brand new).

    I understand that people want to see the topics with the newest posts but if a new post (with no replies) is newer than the last reply of an older post shouldn't it be at the top?

    (i am still on a master branch from a few weeks ago)

    Thanks,

  • @whitts said:

    if a new post (with no replies) is newer than the last reply of an older post shouldn't it be at the top?

    that's how it works. it's not working for you this way?

    this community is on latest master (may be a day old) and it works here.

  • @pichalite I am trying to replicate it but I cant :(.... Heres a screenshot of what i saw:

    0_1456448807839_upload-39a60032-494c-462c-864e-f87bd15b9c89

    Maybe someone posted in the older post, deleted and purged?

  • @whitts may be... try that scenario (post, delete and purge) and check

  • @whitts I just tried it in testing ground... if you reply... delete and purge the reply the post stays on top

  • @pichalite ah.. at least now i know when someone has deleted and purged 😉

  • @whitts you can see those in ACP -> Advanced -> Events I think.

  • @pichalite Now i know why i never went to that link - it crashes my forum 🙂 ... Prob due to me being on an old master.

  • @whitts don't think that link was changed recently... it shouldn't crash just because you are on an old master... what error do you see in the logs?

  •  25/2 19:33 [162332] - error: TypeError: Cannot set property 'jsonString' of undefined
     [cluster] Child Process (162332) has exited (code: 1, signal: null)
     at C:\Apps\nodebb\src\events.js:53:23
    [cluster] Spinning up another process...
    at Array.forEach (native)
    at C:\Apps\nodebb\src\events.js:50:16
    at fn (C:\Apps\nodebb\node_modules\async\lib\async.js:746:34)
    at C:\Apps\nodebb\node_modules\async\lib\async.js:1212:16
    at C:\Apps\nodebb\node_modules\async\lib\async.js:166:37
    at C:\Apps\nodebb\node_modules\async\lib\async.js:706:43
    at C:\Apps\nodebb\node_modules\async\lib\async.js:167:37
    at C:\Apps\nodebb\node_modules\async\lib\async.js:1208:30
    at C:\Apps\nodebb\src\database\mongo\hash.js:53:4
    TypeError: Cannot set property 'jsonString' of undefined
    at C:\Apps\nodebb\src\events.js:53:23
    at Array.forEach (native)
    at C:\Apps\nodebb\src\events.js:50:16
    at fn (C:\Apps\nodebb\node_modules\async\lib\async.js:746:34)
    at C:\Apps\nodebb\node_modules\async\lib\async.js:1212:16
    at C:\Apps\nodebb\node_modules\async\lib\async.js:166:37
    at C:\Apps\nodebb\node_modules\async\lib\async.js:706:43
    at C:\Apps\nodebb\node_modules\async\lib\async.js:167:37
    at C:\Apps\nodebb\node_modules\async\lib\async.js:1208:30
    at C:\Apps\nodebb\src\database\mongo\hash.js:53:4
    

    @pichalite So is the newest to oldest thing a bug then? Thanks

  • @whitts no... events has lot of other items not just delete and purge. Try updating to latest master and see if you still get the error.

  • @pichalite said:

    @whitts I just tried it in testing ground... if you reply... delete and purge the reply the post stays on top

    I meant is this is a bug

  • @whitts I am not sure. @administrators ?

    I think the purge option should be removed for OP. It should only be for admins / mods

  • @whitts Have you find a solution ? I have the same error when i try to open the events page.

    Edit :
    Resolved the bug by the deletion of events data from mongodb.
    My guess is that I had a Event:Time object without an Event object in my database (event 2) :

    { "_id" : ObjectId("5758921b709a80dacd11a26b"), "_key" : "event:1", "type" : "restart", "uid" : 1, "ip" : "xxxxxxxxx", "timestamp" : 1465422363350, "eid" : 1 }
    { "_id" : ObjectId("5759ce06709a80dacd11a281"), "_key" : "event:3", "type" : "reload", "uid" : 1, "ip" : "xxxxxxxxx", "timestamp" : 1465503238088, "eid" : 3 }
    { "_id" : ObjectId("5759d4c6709a80dacd11a289"), "_key" : "event:4", "type" : "restart", "uid" : 1, "ip" : "xxxxxxxx", "timestamp" : 1465504966779, "eid" : 4 }
    { "_id" : ObjectId("5759d5afec5ec8c2ea6f7f4f"), "_key" : "event:5", "type" : "restart", "uid" : 1, "ip" : "xxxxxxxx", "timestamp" : 1465505199678, "eid" : 5 }
    { "_id" : ObjectId("5759d5afec5ec8c2ea6f7f4e"), "_key" : "events:time", "value" : "5", "score" : 1465505199678 }
    { "_id" : ObjectId("5759d4c6709a80dacd11a288"), "_key" : "events:time", "value" : "4", "score" : 1465504966779 }
    { "_id" : ObjectId("5759ce06709a80dacd11a280"), "_key" : "events:time", "value" : "3", "score" : 1465503238088 }
    { "_id" : ObjectId("5759cc2f709a80dacd11a27e"), "_key" : "events:time", "value" : "2", "score" : 1465502767958 }
    { "_id" : ObjectId("5758921b709a80dacd11a26a"), "_key" : "events:time", "value" : "1", "score" : 1465422363350 }


Suggested Topics