locomotivecms/engine — Issue #296: Strange error when uploading a file
Author: geraudmathe
Created: 2012-02-01 15:15:17+00:00
State: open

Hi Guy !

I have a locomotive instance running on heroku with a model that have multiple file fields (maybe the bug come from there ?).

When i try to upload a file in my model admin panel, the app goes down and i get this in my log :

Started POST "/admin/content_types/projects/contents" for 82.230.94.97 at 2012-02-01 06:53:44 -0800
2012-02-01T14:53:44+00:00 app[web.1]: [LocomotiveCMS] [fetch site] host = testdeploiment.heroku.com / testdeploiment.heroku.com
2012-02-01T14:53:44+00:00 heroku[router]: POST testdeploiment.heroku.com/admin/content_types/projects/contents dyno=web.1 queue=0 wait=0ms service=487ms status=500 bytes=728
2012-02-01T14:53:44+00:00 heroku[nginx]: 82.230.94.97 - - [01/Feb/2012:14:53:44 +0000] "POST /admin/content_types/projects/contents HTTP/1.1" 500 728 "http://testdeploiment.heroku.com/admin/content_types/projects/contents/new" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7" testdeploiment.heroku.com
2012-02-01T14:53:44+00:00 app[web.1]:
2012-02-01T14:53:44+00:00 app[web.1]: ActionView::Template::Error (can't convert nil into String):
2012-02-01T14:53:44+00:00 app[web.1]: 3: - if form.object.send(:"#{field._name}?")
2012-02-01T14:53:44+00:00 app[web.1]: 5: %strong
2012-02-01T14:53:44+00:00 app[web.1]: 6: = link_to File.basename(form.object.send(field._name).url), form.object.send(field._name).url
2012-02-01T14:53:44+00:00 app[web.1]: 7: %span
2012-02-01T14:53:44+00:00 app[web.1]: 8: /
2012-02-01T14:53:44+00:00 app[web.1]: 9: != t('.delete_file')
2012-02-01T14:53:44+00:00 app[web.1]:
2012-02-01T14:53:44+00:00 app[web.1]: 4: %p.remove
2012-02-01T14:53:44+00:00 app[web.1]:

Txs 4 the help.