The issue concerns a bug in the ‘select + replies’ functionality, where the number of selected posts is incorrectly counted. mbauman reports that selecting all posts individually yields 53, but using ‘select + replies’ results in 60 selected posts, with the count increasing by two upon reselection. This discrepancy prevents users from creating new topics from selected posts. not-ethan suggests the issue might involve moderator messages, but mbauman clarifies none are present. ghassan initially couldn’t reproduce the issue but later found it occurs when deselecting and reselecting ‘select + replies’, causing replies to be double-selected. ghassan has submitted a pull request to fix the bug.
I have a topic with 53 replies. If I go through the topic and individually select each individual post in the topic, I get 53 posts selected.
If, however, I go through the topic and use the select +replies button (where available, just a plain select otherwise), I end up with a count of 60 posts:
And in fact, if I deselect a post that has a reply to it, the count goes down by one. But when I do a select +replies again, the count goes back up by two!
Why does this matter? Well, for one, if the system thinks you’ve selected as many posts as there are in the topic (or more), you lose the ability to create a new topic from the selected posts! This is how I noticed the bug in the first place:
I was just looking into this but I couldn’t reproudce. (I am running the master of discourse last commit is e7e23e8d9ce73ac61b970d5192f9f4af90b3a87c)
I have created a topic, and did normal posts and reply posts. And I got consistant result. When I choose select+replies, it will autmotically select the post and its replies.
Note: The topic, posts and replies were all created by the same user.
Edit: I was able to reproduce when I unselect and then reselect. I think the porblem is when unselecting the “select+replies” and then unselect
It will not unselect the replies
When choosing the “select+replies” again, it will double select the replies (though already selected)