-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comment Error Message appears on another page #7896
Comments
Hi @jscastanos , I would like to work on this issue. |
@PrakharSharma41 Sure, go ahead. Just don't forget to mention @publiclab/reviewers in your PR |
Thanks for reporting this @jscastanos |
@cesswairimu No problem. I'll try to find some more in my spare time. |
Hi, I would like to work on this issue 😊 |
Hi, we'd love help with this -- but it may be a bit tangled and difficult to figure out. We do have comment error handling for asynchronous comment submissions, but it may require some digging into code at /app/assets/javascript/ to find where that code is and a look at the Rails controller at /app/controllers/comments_controller.rb (i think?) to see why it's not sending back an error that the client-side JavaScript code can receive and display before refreshing the page. Does that make sense? Thanks!! |
Hi @jywarren , what I can see is when we create a new comment successfully it responds with this javascript file and then notyNotification displays notification that comment has been successfully added. However, when we send empty body it falls inside rescue portion which generates a flash and since it is ajax request and the flash is not displayed it gets stored in flash hash and it displays on another page. So, what we can do is we can add response status 400 and remove the flash so that when this ajax request fails this set of code will add notyNotification |
Nice catch @urvashigupta7. I can see @PrakharSharma41 also claimed this issue. Let's check with them if they have started working on this one? Maybe you both can collaborate to solve this issue. Thanks!! |
Thanks @gauravano 😊. @PrakharSharma41 Are you still working on this? |
Hi @gauravano , @jywarren. Should I open a pull request as Prakhar hasn't replied yet? |
@urvashigupta7 go ahead. Thanks |
Yay, thanks all! Good to see you @gauravano !! |
Please describe the problem (or idea)
Steps to produce:
NOTE: the bug mention above will not occur if you are going to refresh the page manually. (but it shouldn't be that way)
Please show us where to look
https://publiclab.org/notes/silentsairam/06-10-2019/an-insight-on-indoor-air-pollutants-factors-sources-pollutants or any related links
What's your PublicLab.org username?
Browser, version, and operating system
Thank you!
Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.
To learn how to write really great issues, which increases the chances they'll be resolved, see:
https://publiclab.org/wiki/developers#Contributing+for+non-coders
The text was updated successfully, but these errors were encountered: