Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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

+4
−0

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.

Tags list showing math tag has 5 posts

Posts list for math tag showing 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.

Q&A tags list showing mobile tag has 3 posts

Q&A posts list for mobile tag showing only 2 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.

Challenges tags list showing mobile tag has 3 posts

Challenges posts list for mobile tag showing only 2 posts

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (5 comments)

1 answer

+2
−0

I understand what is happening right here(with the counting).

In Codegolf, sequence tag has 5 posts.

sequence tag

But, it only has 4 question

tag:sequence questions

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.

sequence tag

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (1 comment)

Sign up to answer this question »