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

Error 404 when comment using mention i.e. @[user] #6166

Closed
manjitapandey opened this issue Dec 15, 2023 · 4 comments · Fixed by #6217
Closed

Error 404 when comment using mention i.e. @[user] #6166

manjitapandey opened this issue Dec 15, 2023 · 4 comments · Fixed by #6217
Assignees
Milestone

Comments

@manjitapandey
Copy link

Describe the bug
When commenting on comment section during project mapping, validation as well as Question and answer section, mentioning to any user gives error 404.
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to project page
  2. Select task to map or validate
  3. Comment on the task by mentioning
  4. See error on in network tab

Screenshots
image
image
image

Additional context
The error doesn't disturb on the workflow i.e. user will be able to perform/submit mapping and validation.

@Aadesh-Baral
Copy link
Contributor

@ramyaragupathy working on this issue

@royallsilwallz
Copy link
Contributor

Hey @Aadesh-Baral, when are you planning to look into this issue? Did you find anything yet?

@Aadesh-Baral
Copy link
Contributor

Aadesh-Baral commented Jan 16, 2024

Hi @royallsilwallz, I've been investigating the issue, and it appears to be related to the frontend. It seems there might be a problem either in our implementation of TributeJS for mentions or in TributeJS itself. Specifically, when a user is mentioned and the Tribute popup is closed, the user search endpoint should not be triggered. Currently, we are making a request to the user search endpoint with every key press in the text area, considering the text after @ as the search query even after the popup is closed.

One potential solution could be to use the tribute.isActive flag to check if the Tribute popup is open before making a request to the user search endpoint. However, there seems to be an issue in implementing this approach. The problem lies in the fact that the tribute.isActive flag returns false and then immediately true once the menu is closed. Here's the sequence of events:

  • User presses @ -> Tribute popup opens, and tribute.isActive flag is set to true.
  • User starts typing a username -> A request is made to the user search endpoint, and the results are displayed in the Tributejs popup menu. tribute.isActive flag is still true.
  • User clicks on any username or tabs to complete mentioning -> tribute.isActive flag is set to false and then immediately set to true. Due to this immediate set to true, on every key press the user search endpoint is called with the text after the @.

The issue might be in how we implemented tributejs or could potentially be a problem in TributeJS itself. However, I couldn't find such issues in the TributeJS repository.

@royallsilwallz
Copy link
Contributor

Hey @Aadesh-Baral, I've made a PR for this issue. Can you verify ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants