Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug count wrong on merged stories #1275

Closed
pushcx opened this issue May 12, 2024 · 2 comments
Closed

Bug count wrong on merged stories #1275

pushcx opened this issue May 12, 2024 · 2 comments

Comments

@pushcx
Copy link
Member

pushcx commented May 12, 2024

Unconfirmed, pasting from IRC so it doesn't get lost:

aibou Hi, I think that there is a bug causing the website to display a wrong number of comments on "merged" stories. One example is https://lobste.rs/s/0qvtim/, which says there are 138
comments, even though there appear to be 148 comments. Another is https://lobste.rs/s/uihyvs/, indicating 306 rather than 311. I estimated the correct number of comments
by Ctrl-F searching for the number of occurrences of "comment_text" in the HTML source.

@rog404
Copy link

rog404 commented May 21, 2024

Hi @pushcx

I have verified that this is not an issue.

When using the comment_text tag, comments removed by the author are also being captured. This explains why there are more comments than those visible on the page.

To confirm this, you can filter by:
div.comment div.comment_text => resulting in 148 comments in the first example (all comments)

However, when you filter by:
div.bad div.comment_text => resulting in 10 comments (deleted comments)

Therefore, the 138 comments counter is correct.

@pushcx
Copy link
Member Author

pushcx commented Jun 6, 2024

Thanks for investigating this report, glad to have this puzzle solved.

@pushcx pushcx closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants