Submitting an answer to a question opened a note from 2010
What happened just before the problem occurred
I clicked submit to post an answer to a question. I was taken to this note: https://publiclab.org/notes/warren/12-14-2010/plant-spectral-timelapse-7hrs with this error: "Only the author of the comment can edit it."
Relevant URLs
https://publiclab.org/questions/shubham/08-17-2016/how-to-neutralize-remove-the-source-s-spectra-to-obtain-absorption-spectra
PublicLab.org username
cfastie
@Fastie Solving this asap
This only happened once and at other times submitting an answer worked normally (except for the truncation). I'm sorry I don't have better information about what might have caused this, but it seemed like a clue that something was weird.
Ok I figured out what might have have occurred. Problem was in this line: https://github.com/publiclab/plots2/blob/master/app/views/comments/_edit.html.erb#L1. The form action is decided by the controller. What might have happened is you submitted an answer and soon after that you pressed the edit button of the answer and pressed submit. Since initially the created answer was due to a ajax request that was processed by the answer_controller the action of the edit form was set to comment/update. So on submission of the edit form the request passed on the update action of comment_controller where the redirect path was decided by this method: https://github.com/publiclab/plots2/blob/master/app/controllers/application_controller.rb#L152-L168 which took a comment matching with a similar id and the path was that of the comment parent which was perhaps the note you mentioned! This was a tricky fix indeed! :blush:
Anyways this is addressed in PR #692 and will be fixed soon!
Great sleuthing!
On Thu, Aug 18, 2016 at 4:04 PM, Ananya Maiti [email protected] wrote:
Anyways this is addressed in PR #692 https://github.com/publiclab/plots2/pull/692 and will be fixed soon!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/680#issuecomment-240839718, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ3jsuyB2_4ZloC9RHRyqKUtQFEpdks5qhLq2gaJpZM4Jmos9 .