X replies dropdown shows doubled count for "popcorn" replies
-
In a thread such as https://what.thedailywtf.com/topic/19454/nodebb-updates that is reply-restricted and using our custom "Popcorn" button to allow replies in a linked thread, the "show replies to this post" drop down is showing double the number of actual replies.
E.g. - at the time of this posting:
https://what.thedailywtf.com/post/1383438 has 2 replies, and shows "4 Replies" on the button to expand replies. Expanding the button only shows the 2 actual replies.
I scrolled backwards through a dozen or so posts in the Updates thread, and all of them showed the same doubling of the reply count.
-
Yes, and I can't figure out why no matter how hard I try.
-
I wonder if, because it's counting posts from a different thread, it's somehow counting the quoted post as a reply?
Edit: Ok, it's not the quote part that's breaking it (as evidenced by my test in the Discussions thread), but the Replies box IS pulling the whole Discussions thread when you expand it on the last post in the NodeBB updates thread and scroll down (which I seem to remember is a different bug altogether), so I wonder if it's still something related to the fact that the post it's pulling from is from a different thread.
Does that behavior show up from Reply-As-Topic, I wonder? (Edit edit: No, reply-as-topic doesn't seem to trigger an entry in the Replies box...)
-
Would it be possible to inject some code as to ascertain what it is counting that gets it to 4?
-
@PleegWat This is a Node forum, remember. Add in the counter injection and suddenly it'll start saying "42" out of nowhere.
-
@e4tmyl33t
If we’re going for speculation, my assumption is that it’s related to the special casing for Popcorn threads that are hidden to posters in the main thread (e.g. Club Ded threds for mafia.)
-
@izzion Entirely possible. I tracked down the file that stuff was in on github before remembering I don't know JS and couldn't follow the logic for shit :D
-
@e4tmyl33t said in X replies dropdown shows doubled count for "popcorn" replies:
I don't know JS and couldn't follow the logic for shit
You're assuming there's logic in JS
-
Here's the code, by the way: https://github.com/boomzillawtf/tdwtf/blob/eb144e86c9a2b828e2ae2eb9f5f609ab938262d6/plugins/nodebb-plugin-tdwtf-customizations/index.js#L613-L697
-
I'm going to reply to this post and then move the reply to Rubbish. Let's see how many replies it says this post has.
-
-
I will move the reply to this post into a One Post thread.
-
Weird, it still just says 1 reply. I wonder if something else is modifying the reply count in Popcorn threads...
-
Ok, new idea: moving the reply to this post to a Bugs thread.
-
Nope :(