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

Comments as indicated by comment count aren't shown #2826

Closed
aschrijver opened this issue Apr 22, 2023 · 11 comments
Closed

Comments as indicated by comment count aren't shown #2826

aschrijver opened this issue Apr 22, 2023 · 11 comments
Labels
area: language-handling bug Something isn't working

Comments

@aschrijver
Copy link

Found a bug? Please fill out the sections below. 👍

For backend issues, use lemmy

Issue Summary

On lemmy.ml posts do not show the correct number of comments that are listed at the summary in the top of the post.

For this post https://lemmy.ml/post/968357 there should be (now) 5 comments, but zero comments are listed below. When opening the URL in Mastodon I can see 4 comments.

PS. I posted this problem to lemmy-support in https://lemmy.ml/post/970161 which says there should be 12 comments, of which 8 are shown below.

Steps to Reproduce

  1. Navigate to https://lemmy.ml/post/968357
  2. See the number of comments: 5 (currently)
  3. Find the comments missing below.

Technical details

There are 3 browser console errors (second error occurs twice):

Websocket closed. client.js:2:1157015
    ws https://lemmy.ml/static/js/client.js:2
    dispatchEvent https://lemmy.ml/static/js/client.js:2
    dispatchEvent https://lemmy.ml/static/js/client.js:2
    handleEvent https://lemmy.ml/static/js/client.js:2
    handleCloseEvent https://lemmy.ml/static/js/client.js:2
The Notification permission may only be requested from inside a short running user-generated event handler. 2 968357

This on Firefox 111.0.1 on Ubuntu.

The URL's of the comments as seen from Mastodon UI are (one comment not visible on Mastodon too, as viewed from @smallcircles@social.coop):

@aschrijver aschrijver added the bug Something isn't working label Apr 22, 2023
@aschrijver
Copy link
Author

In addition I notice that jumping from Notifications to the particular comment also does not work in all cases. I.e. clicking https://lemmy.ml/comment/419075 does not lead me to https://lemmy.ml/post/970161 as it should. That comment is also not shown when opening the post URL, so that's likely related.

Lastly, just below comment https://lemmy.ml/comment/418864 it says "One more reply -->" but clicking that does not nothing (and no new errors in console).

@dessalines dessalines transferred this issue from LemmyNet/lemmy-ui Apr 22, 2023
@dessalines
Copy link
Member

dessalines commented Apr 22, 2023

These are federation related issues with other projects.

In addition I notice that jumping from Notifications to the particular comment also does not work in all cases. I.e. clicking https://lemmy.ml/comment/419075 does not lead me to https://lemmy.ml/post/970161 as it should.

Its working correctly, going to the comment context.

Lastly, just below comment https://lemmy.ml/comment/418864 it says "One more reply -->" but clicking that does not nothing (and no new errors in console).

My browser's just show the rest of the comments, there being just two.

There are some issues with the comment count deletion triggers, #2031 , which is another issue I should reopen.

@Nutomic
Copy link
Member

Nutomic commented Apr 23, 2023

There is definitely something wrong with the comment counter. This post mentioned above says that it has 6 comments, but only 5 are shown. I also checked in the database (select id from comment where post_id = 968357;) and it only returned 5 comments. So it doesnt sound like deletion triggers are the problem.

@aschrijver
Copy link
Author

I wonder if this problem is restricted to specific setups. For me the issue is such that Lemmy has become totally unusable as most comments aren't shown at all. But I'd expected more people to mention similar problems if it was universal issue.

@Nutomic
Copy link
Member

Nutomic commented May 2, 2023

Do you have "Undetermined" language selected under /settings? That could be one reason why comments are missing. It also looks like the displayed count is just incorrect as mentioned in my last comment.

@aschrijver
Copy link
Author

aschrijver commented May 3, 2023

No, the language is set to 'English'.

It is not just the count. For instance in https://lemmy.ml/post/60475 I know for a fact that there are a whole bunch of comments, as I update the post regularly with new references on the topic. Yet only two comments are shown:

@Nutomic
Copy link
Member

Nutomic commented May 5, 2023

Most of these comments probably dont specify a language and use the default of "undetermined". So you need to enable that in your settings to see them. For me with "undetermined" language enabled it shows dozens of comments.

@Nutomic
Copy link
Member

Nutomic commented May 5, 2023

I opened an issue about this here: LemmyNet/lemmy-ui#999

@aschrijver
Copy link
Author

Yes, thank you @Nutomic, this is the issue indeed. I will add a comment to the UI issue with a suggested improvement to Settings.

@dessalines
Copy link
Member

This is a back-end issue. Now that there are language filters, that means that comment counts are going to be specific to specific users, and that's not accounted for in the post_aggregates table.

I'm not really sure the best way to handle that without adding more inefficient on-demand queries.

@Nutomic
Copy link
Member

Nutomic commented Mar 15, 2024

I believe all the issues with comment counts have been resolved.

@Nutomic Nutomic closed this as completed Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: language-handling bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants