What happened just before the problem occurred? Or what problem could this idea solve?
The error message doesn't behave as it should be.
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)
What did you expect to see that you didn't?
The error message should appear on the page it should be and without any manual action.
https://publiclab.org/notes/silentsairam/06-10-2019/an-insight-on-indoor-air-pollutants-factors-sources-pollutants or any related links
This can help us diagnose the issue:
jec_castanos
Many bugs are related to these -- please help us track it down and reproduce what you're seeing!
Chrome - Version 81.0
Windows 10
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
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 !!
Most helpful comment
Yay, thanks all! Good to see you @gauravano !!