Fresh install - User bugs again

Bug Reports
  • You are up-to-date ```
    
    I updated to master too but that didn't change much other than the markdown not being rendered in the first post.
    
    Another thing I noticed was that the first post in every thread has been duplicated and is posted as the second post too.
  • should fix the online/latest users bug.

    I noticed the other problem with duped main posts on your forum as well. Although I can't reproduce it on my mongodb forum. It looks like the upgrade script failed and the main post wasn't removed from the replies. You can confirm by looking at the database for one of the topics that has the problem.

    // check the topic data for mainPid
    db.objects.findOne({_key:"topic:100"}, {_id:0, _key:0});
    
    // check the replies and see if it has the mainPid too
    db.objects.find({_key: "tid:100:posts"}, {fields: {_id: 0, value: 1, score: 1}});
    

    Check the value of mainPid from the first query and then look for the same value in the result of the second one.

  • @baris db.objects.find({_key: "tid:100:posts"}, {fields: {_id: 0, value: 1, score: 1}});

    returns

    error: { "$err" : "Unsupported projection option: _id", "code" : 13097 }

    That commit has fixed the online user issue though, thanks!

  • You can probably remove those stuff and just use

    db.objects.findOne({_key:"topic:100"});
    db.objects.find({_key: "tid:100:posts"});
    
  • @baris said:

    db.objects.find({_key: "tid💯posts"});

    > db.objects.findOne({_key:"topic:100"});
    {
            "_id" : ObjectId("53c930aa94b197dbb6f1006b"),
            "_key" : "topic:100",
            "cid" : "2",
            "deleted" : 0,
            "lastposttime" : 1405974339177,
            "locked" : 0,
            "mainPid" : "570",
            "pinned" : 0,
            "poll:id" : 4,
            "postcount" : 12,
            "slug" : "100/messing-with-the-logo",
            "thumb" : "",
            "tid" : 100,
            "timestamp" : 1405694122358,
            "title" : "Messing with the logo...",
            "uid" : 1,
            "viewcount" : 232
    }
    
    
    > db.objects.find({_key: "tid:100:posts"});
    { "_id" : ObjectId("53c930aa94b197dbb6f10071"), "_key" : "tid:100:posts", "score" : 1405694122402, "value" : "570" }
    { "_id" : ObjectId("53c93be894b197dbb6f100c9"), "_key" : "tid:100:posts", "score" : 1405697000698, "value" : "571" }
    { "_id" : ObjectId("53c97bd094b197dbb6f101a9"), "_key" : "tid:100:posts", "score" : 1405713360694, "value" : "572" }
    { "_id" : ObjectId("53c9902294b197dbb6f101e3"), "_key" : "tid:100:posts", "score" : 1405718562441, "value" : "573" }
    { "_id" : ObjectId("53cd116994b197dbb6f1054b"), "_key" : "tid:100:posts", "score" : 1405948265908, "value" : "574" }
    { "_id" : ObjectId("53cd2c7d94b197dbb6f10571"), "_key" : "tid:100:posts", "score" : 1405955197830, "value" : "575" }
    { "_id" : ObjectId("53cd34e194b197dbb6f105a5"), "_key" : "tid:100:posts", "score" : 1405957345962, "value" : "576" }
    { "_id" : ObjectId("53cd356494b197dbb6f105cb"), "_key" : "tid:100:posts", "score" : 1405957476031, "value" : "577" }
    { "_id" : ObjectId("53cd359a94b197dbb6f105f3"), "_key" : "tid:100:posts", "score" : 1405957530537, "value" : "579" }
    { "_id" : ObjectId("53cd35b494b197dbb6f10604"), "_key" : "tid:100:posts", "score" : 1405957556026, "value" : "580" }
    { "_id" : ObjectId("53cd6d8b94b197dbb6f108c6"), "_key" : "tid:100:posts", "score" : 1405971851569, "value" : "585" }
    { "_id" : ObjectId("53cd774394b197dbb6f108de"), "_key" : "tid:100:posts", "score" : 1405974339177, "value" : "586" }
    
    
  • So as suspected mainPid 570 is in tid:100:posts but it shouldn't be.

    The upgrade script should have removed those

    not sure why it is broken on your forum. Do you have a db backup before 6th june? That is when that upgrade script was added.

    You can run a one time script to fix all the sorted sets.

    Backup your database. Add this piece of code into this file. Run the forum in dev mode and browse to /debug/fixTopics. This will remove the mainPid from the sorted sets tid:<tid>:posts and tid:<tid>:posts:votes.

    Let me know if that fixes your problem.

  • @baris That worked, thanks for the quick fix man! ❤

  • I have just noticed that the user status on the profile page does not show correctly either.

    Shows offline when i am online.

  • should fix it.

  • noticed it here too. I'll update and see if it fixes.


Suggested Topics


  • 0 Votes
    1 Posts
    298 Views
  • 1 Votes
    1 Posts
    653 Views
  • Login is bug

    Bug Reports
    0 Votes
    5 Posts
    2165 Views
  • 0 Votes
    9 Posts
    4258 Views
  • Emailer local bug?

    Bug Reports
    0 Votes
    9 Posts
    3061 Views