Bug #244
Feature #36: associate publications with projects
Feature #175: New Publications Page
Error when submitting new publication
| Status: | Closed | Start date: | 2011-08-01 | ||
|---|---|---|---|---|---|
| Priority: | Immediate | Due date: | |||
| Assignee: | % Done: | 20% | |||
| Category: | - | ||||
| Target version: | Bibliography Alpha |
Description
I navigated to a project that I manage and that has the Bibliography module enabled, and clicked on "Add Publication to this Project" (while testing #240).
I entered a title, added myself as author, and selected Article for the Bibtex type, then hit the submit button and got an error page. The page URL after form submission was http://test.soundsoftware.ac.uk/cannam/publications (with no GET arguments) and the error was:
ActiveRecord::AssociationTypeMismatch in PublicationsController#create
Project(#88402500) expected, got NilClass(#73867720)
RAILS_ROOT: /var/www/test-cannam
Application Trace | Framework Trace | Full Trace
Request
Parameters:
{"commit"=>"Save changes",
"authenticity_token"=>"PETphpPvoFl1hFISHzTAS/d7wHCfAVnQqy3EzGFG5oY=",
"publication"=>{"bibtex_entry_attributes"=>{"entry_type"=>"1",
"chapter"=>"",
"editor"=>"",
"pages"=>"",
"publisher"=>"",
"booktitle"=>"",
"year"=>""},
"title"=>"Why Weevils will one day Rule the Scientific World",
"authorships_attributes"=>{"0"=>{"name_on_paper"=>"Plargh Willoughby",
"institution"=>"",
"user_id"=>"",
"_destroy"=>"",
"email"=>"chris.cannam/plargh.willoughby@eecs.qmul.ac.uk"}}}}
Show session dump
Response
Headers:
{"Content-Type"=>"text/html",
"Cache-Control"=>"no-cache"}
History
#1
Updated by Luis Figueira over 14 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 20
I addded a safety test, but was unable to replicate this bug… could you give me more feedback on this?
#2
Updated by Luis Figueira over 14 years ago
- Status changed from In Progress to Feedback
#3
Updated by Chris Cannam over 14 years ago
- Status changed from Feedback to In Progress
- Priority changed from Normal to Immediate
Now I have a different error. Process was exactly as above -- this time I was re-entering a publication after clearing out the database while recovering from #254.
RuntimeError in PublicationsController#create
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
RAILS_ROOT: /var/www/test-cannam
Application Trace | Framework Trace | Full Trace
Request
Parameters:
{"commit"=>"Save changes",
"authenticity_token"=>"dDAgvDAD7o31gDzDrg/rpym9QzEiIPgF+zpQ516OcBQ=",
"publication"=>{"bibtex_entry_attributes"=>{"entry_type"=>"1",
"chapter"=>"",
"editor"=>"",
"pages"=>"",
"publisher"=>"",
"booktitle"=>"",
"year"=>""},
"title"=>"A Novel Method for Discerning between Apparently Identical Classes of Weevil",
"authorships_attributes"=>{"0"=>{"name_on_paper"=>"Plargh Willoughby",
"institution"=>"",
"user_id"=>"",
"_destroy"=>"",
"email"=>"chris.cannam/plargh.willoughby@eecs.qmul.ac.uk"}}}}
Show session dump
Response
Headers:
{"Content-Type"=>"text/html",
"Cache-Control"=>"no-cache"}
#4
Updated by Chris Cannam over 14 years ago
- Status changed from In Progress to Closed
Report is out of date.