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: Post comments are invisible in Individual Post Page. #2333

Closed
Azad99-9 opened this issue Jan 18, 2024 · 3 comments · Fixed by #2350
Closed

Bug: Post comments are invisible in Individual Post Page. #2333

Azad99-9 opened this issue Jan 18, 2024 · 3 comments · Fixed by #2350
Assignees
Labels
bug Something isn't working feature request

Comments

@Azad99-9
Copy link

Azad99-9 commented Jan 18, 2024

Describe the bug
Post comments in individual post page are empty and invisible despite the existence of comments.

To Reproduce
Steps to reproduce the behavior:

  1. Login and Join an organisation.
  2. Create a post in case of empty posts.
  3. Find the created post in news feed and click on its comment option.
  4. Add a new comment.
  5. Navigate back to news feed.
  6. Once again click on same post comment option.

Expected behavior
The previously created comment should be visible.

Actual behavior
The comment list is empty despite the comment icon showing non zero value.

Screenshots

commentbug.mp4

Additional details
Add any other context or screenshots about the feature request here.

Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship #359

@Azad99-9 Azad99-9 added the bug Something isn't working label Jan 18, 2024
@github-actions github-actions bot added feature request unapproved Unapproved, needs to be triaged labels Jan 18, 2024
@imshivam-gupta
Copy link

imshivam-gupta commented Jan 19, 2024

@noman2002 @Cioppolo14
Can you please assign this to me

@Cioppolo14 Cioppolo14 removed the unapproved Unapproved, needs to be triaged label Jan 19, 2024
@imshivam-gupta
Copy link

imshivam-gupta commented Jan 21, 2024

I have found the cause of bug and will try to create a PR to fix this till tomorrow.

@Azad99-9
Copy link
Author

Azad99-9 commented Jan 24, 2024

Reply of comment

@Cioppolo14 @noman2002 please understand yes this is a valid issue.

@Dante291 we can do fix this:
1. without the interference of backend.
2. without directly altering the getPostById query.
moreover @imshivam-gupta has mostly succeeded in doing it but a minor change is left.

  1. Dont modify the getPostById query as we may require it for future use, instead modify the getPostsComments query from comment_queries.dart as shown in below image.

Screenshot from 2024-01-24 13-47-40

  1. in getCommentsForPost method

Screenshot from 2024-01-24 13-35-46

replace
final String getCommmentQuery = PostQueries().getPostById(postId);

with
final String getCommmentQuery = CommentQueries().getPostsComments(postId);.

These two steps will fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants