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

Toggling of follow button in javascript breaks replies when subscription is disabled #175

Closed
devmedtz opened this issue Mar 25, 2021 · 6 comments · Fixed by #178
Closed
Labels
bug Something isn't working
Milestone

Comments

@devmedtz
Copy link

devmedtz commented Mar 25, 2021

Environment

  • python version = 3.9
  • django Version = 3.1.1
  • django-comments-dab = 2.6.0

Describe the bug

I got a JS alert error "Unable to post your comment! please try again" when replying to a comment, after clicking the okay button the reply appended, while the form not clear

Steps To Reproduce

  1. Do not use the subscription option i.e. make sure COMMENT_ALLOW_SUBSCRIPTION is not set to True(which is the default behavior).
  2. Try to reply to a comment.

Expected behavior

The reply should submit without an error.

Screenshots

If applicable, add screenshots to help explain your problem.
Capture

@devmedtz devmedtz added the bug Something isn't working label Mar 25, 2021
@abhiabhi94
Copy link
Collaborator

Till you can fill in the steps to reproduce, it would be liking shooting in the dark to figure out what exactly caused this behavior.

@abhiabhi94
Copy link
Collaborator

abhiabhi94 commented Mar 25, 2021

The library seems to be working fine on my end.

Until we can reproduce the issue at our end, I'm afraid we can't offer any help. Please list the steps to reproduce your issue. If you have any doubts regarding the setup of the application, please have a look at the test application.

Also, please consider posting the output on the web console of your browser when you get such an error.

@devmedtz
Copy link
Author

The console is clear, not shown any error

@abhiabhi94
Copy link
Collaborator

Hey @devmedtz, open-source is not free tech support.

Unless you are paying someone, they don't have time to go to your website, register an account and do-stuff to solve your issue.
To reproduce the issue, either you can give me details of a dummy account on that website
OR
Please try to list the minimal steps that you have done after the installation of django-comments-dab so that the error that can be reproduced.

Even the repository link that you gave is having issues, when trying to create a superuser. You are probably using the method normalize_username at the wrong place in your code for creating user.

@abhiabhi94 abhiabhi94 changed the title Get JS alert error "Unable to post your comment!, please try again" when reply a comment Toggling of follow button in javascript breaks replies when subscription is disabled Mar 25, 2021
@abhiabhi94
Copy link
Collaborator

Hey @devmedtz, thanks for the issue report.

I have fixed this in the branch https://github.com/abhiabhi94/Comment/tree/fix/follow-js. Could you please use that branch to check and inform me it works on your end now?

@devmedtz
Copy link
Author

Hey @devmedtz, thanks for the issue report.

I have fixed this in the branch https://github.com/abhiabhi94/Comment/tree/fix/follow-js. Could you please use that branch to check and inform me it works on your end now?

It works now to my end, I put COMMENT_ALLOW_SUBSCRIPTION=False OR COMMENT_ALLOW_SUBSCRIPTION=True, Both work fine to my end, Thanks a lot, I really appreciate it.

abhiabhi94 added a commit to abhiabhi94/Comment that referenced this issue Mar 26, 2021
- toggling only takes place when the button is present
abhiabhi94 added a commit to abhiabhi94/Comment that referenced this issue Mar 26, 2021
- toggling only takes place when the button is present
@abhiabhi94 abhiabhi94 added this to the 2.6.1 milestone Mar 26, 2021
Radi85 pushed a commit that referenced this issue Mar 26, 2021
- toggling only takes place when the button is present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants