Submitting a second next action without a page refresh causes a server error
I've experienced this error from both the project page and the home page. Trying to submit two next actions in a row doesn't work. The first gets submitted fine, but "An error occurred on the server" is shown upon trying to submit the second. If I reload the page, it will work properly again. Here's the relevant portion of production.log, showing the first, successful submit and the second, unsuccessful one directly thereafter:
The curious thing, and possibly the source of the bug, is that the second submit shows a blank context_id and project_id, yet I actually had them selected. I have gone back and verified this: I can have both items selected, but they come through blank.
By the way, I'm running 1.04, but that's not in the options for versions.
Processing TodoController#add_item (for 127.0.0.1 at 2006-03-15 11:15:57) [POST]
Parameters: {"action"=>"add_item", "todo"=>{"context_id"=>"1", "project_id"=>"7", "notes"=>"", "description"=>"Use pictures from flier??", "due"=>""}, "controller"=>"todo"}
Rendering todo/add_item
Completed in 0.55939 (1 reqs/sec) | Rendering: 0.02285 (4%) | DB: 0.12051 (21%) | 200 OK "TodoController#add_item (for 127.0.0.1 at 2006-03-15 11:16:46) [POST":http://localhost/todo/add_item]
Processing
Parameters: {"action"=>"add_item", "todo"=>{"context_id"=>"", "project_id"=>"", "notes"=>"put in site", "description"=>"copy stony brook map and put a circle on it", "due"=>""}, "controller"=>"todo"}
Rendering todo/error
Completed in 0.45749 (2 reqs/sec) | Rendering: 0.00282 (0%) | DB: 0.08744 (19%) | 200 OK "":http://localhost/todo/add_item
The curious thing, and possibly the source of the bug, is that the second submit shows a blank context_id and project_id, yet I actually had them selected. I have gone back and verified this: I can have both items selected, but they come through blank.
By the way, I'm running 1.04, but that's not in the options for versions.
Leave a comment
on 2006-03-15 23:22 *
By Anonymous
Status changed from New to Invalid
Status changed from New to Invalid
If you're using Safari, then this is a known bug (with Safari, for once, and not Tracks) - see #101. As you noticed, the call to form.reset() sets context_id to blank, which isn't permitted, so the saving of the next action fails. There is no blank entry in the options list for that very reason, so this shouldn't happen, but as I said, it's a Safari bug (Firefox works fine).
The work around is to make sure when you add successive next actions without refreshing that you actively choose the correct context, even if it appears to be showing the right thing. I'll mark this ticket as 'wontfix' now because I can't fix it until Safari is fixed!
Thanks for reminding me about the version - I've added 1.04 to the list now.
The work around is to make sure when you add successive next actions without refreshing that you actively choose the correct context, even if it appears to be showing the right thing. I'll mark this ticket as 'wontfix' now because I can't fix it until Safari is fixed!
Thanks for reminding me about the version - I've added 1.04 to the list now.