Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Mismatch between tags list and number of posts for a given tag
Sometimes the number of posts indicated in the tags list does not match the number of posts displayed for that tag. This appears to be due to the inclusion of deleted posts in the displayed number. Would it be more helpful to exclude deleted posts so that the numbers match (long term - putting aside caching effects)?
An example from Code Golf
The "math" tag shows 5 posts but clicking on it lists only 3 posts.
An example from Writing
Here the example images are shown first from the "Q&A" section and then from the "Challenges" section. The results are the same posts each time (each post being labelled as Q&A or Challenges depending on what list it is showing in, rather than depending on its genuine category). This is mentioned in existing bug https://github.com/codidact/qpixel/issues/249
This shows that the discrepancy is not due to the existence of other category types.
Moshi points out in a comment that deleted posts are included in the number shown next to each tag, so this probably explains it.
Q&A
Under "Q&A" The "mobile" tag shows 3 posts but clicking on it lists only 2 Q&A posts.
Challenges
Under "Challenges" The "mobile" tag shows 3 posts but clicking on it lists only 2 Challenges posts. As mentioned, these are the exact same 2 posts shown under Q&A, so they are each mislabelled in one of these lists.
1 answer
I understand what is happening right here(with the counting).
In Codegolf, sequence tag has 5 posts.
But, it only has 4 question
I was searching for the issue. What is wrong with the code? Then, I was reviewing posts on with that tag. If you check history of those posts than, you will see @Razetime had edited a post multiple times. Usually, the number of sequence tag was $4. But, when @Razetime had edited that post once. The number became 4+1=5. When he edited that post again the number was as it is. Which means when you edit a post first time the number of question in that tag list will be increase.
I think this will be very hard to solve. The number of sequence tag on following picture was taken from server.
But, in Posts tagged list
it was calculated programmatically. mysqli_num_rows
that's what php programmer writes. While Codidact is written in Ruby. That's why sometime I can't understand code.
This answer will be helpful for Ruby programmer to work on the issue.
1 comment thread