Long thread pagination issues

Bug Reports
  • Hi there.

    From previous version of NodeBB we have this issue. Now we have upgrade to v1.17.2 and still the issue.

    We have one long thread (5400 posts aprox.) and when arrive to the last page it is impossible to go back to previous pages by click on paginator buttons.

    You can test it because it is open.

    First got to any random page, the click the last page, scroll down and click any previous page. You will still on the same last page.


  • Can you provide your commit hash?

    Also post this info from your database.

    db.objects.findOne({_key: "topic:11247"});
    db.objects.count({_key: "tid:11247:posts"});

    The issue seems to be happening because https://vapeandoargentina.com.ar/api/topic/11247/registra-tu-ato-y-mod/5375?page=2&pretty=1 is redirecting you to the wrong place.

  • Hello @baris !




    db.objects.findOne({_key: "topic:11247"});
        "_id" : ObjectId("5c7ac8b2a9d40b676afe5e06"), 
        "_key" : "topic:11247", 
        "tid" : 11247.0, 
        "uid" : 2558.0, 
        "cid" : 9.0, 
        "mainPid" : "199661", 
        "title" : "Registra tu Ato Y Mod", 
        "slug" : "11247/registra-tu-ato-y-mod", 
        "timestamp" : 1551550642008.0, 
        "lastposttime" : 1625739351067.0, 
        "postcount" : 5373.0, 
        "viewcount" : 30948.0, 
        "pinned" : 1.0, 
        "upvotes" : 36.0, 
        "downvotes" : 0.0, 
        "teaserPid" : 497462.0, 
        "thumb" : "", 
        "postercount" : 320.0
    db.objects.count({_key: "tid:11247:posts"});
  • Also these are our pagination settings:


  • Run this query to fix the postcount field in the topic object.

    db.objects.update({_key: "topic:11247"}, {$set: {postcount: 5375 } } );

    Replace 5375 if there are new posts in topic with the correct amount.

    This should fix your issue.

  • @baris Fix it!!


Suggested Topics