Content
Create project fails, 500 Error in 8.10
Added by Eirik S almost 6 years ago
Hi, I am getting this error while trying to create new project in fresh install on ubuntu 16.04 Mysql. I am able to do a copy of existing project.
ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
Please help!
Details:
[2018-10-31T15:08:09.857088 #347] INFO -- : Rendering projects/new.html.erb within layouts/no_menu
[2018-10-31T15:08:09.861094 #347] INFO -- : Rendered projects/form/attributes/_name.html.erb (1.5ms)
[2018-10-31T15:08:09.869234 #347] INFO -- : Rendered customizable/_form.html.erb (7.9ms)
[2018-10-31T15:08:09.881855 #347] INFO -- : Rendered projects/form/attributes/_parent_id.html.erb (12.2ms)
[2018-10-31T15:08:09.883603 #347] INFO -- : Rendered projects/form/attributes/_description.html.erb (1.0ms)
[2018-10-31T15:08:09.884850 #347] INFO -- : Rendered projects/form/attributes/_identifier.html.erb (1.1ms)
[2018-10-31T15:08:09.885894 #347] INFO -- : Rendered projects/form/attributes/_is_public.html.erb (0.8ms)
[2018-10-31T15:08:09.891487 #347] INFO -- : Rendered customizable/_form.html.erb (5.4ms)
[2018-10-31T15:08:09.891566 #347] INFO -- : Rendered projects/form/_project_attributes.html.erb (32.1ms)
[2018-10-31T15:08:09.891695 #347] INFO -- : Rendered projects/_form.html.erb (32.5ms)
[2018-10-31T15:08:09.892788 #347] INFO -- : Rendered projects/new.html.erb within layouts/no_menu (35.6ms)
[2018-10-31T15:08:09.893014 #347] INFO -- : Rendering layouts/base.html.erb
[2018-10-31T15:08:09.898555 #347] INFO -- : Rendered common/_favicons.html.erb (1.6ms)
[2018-10-31T15:08:09.915557 #347] INFO -- : Rendered layouts/base.html.erb (22.5ms)
[2018-10-31T15:08:09.915772 #347] INFO -- : Completed 500 Internal Server Error in 83ms (ActiveRecord: 3.3ms)
[2018-10-31T15:08:09.916500 #347] FATAL -- :
[2018-10-31T15:08:09.916535 #347] FATAL -- : ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
[2018-10-31T15:08:09.917444 #347] FATAL -- :
116: aria-label="<%= I18n.t('js.work_packages.jump_marks.label_content') %>">
117: <%= I18n.t('js.work_packages.jump_marks.content') %>
118: </a>
119: <%= render_top_menu_left %>
120: <div id="logo" class="hidden-for-mobile">
121: <%= link_to(I18n.t('label_home'), home_url, class: 'home-link') %>
122: </div>
[2018-10-31T15:08:09.917479 #347] FATAL -- :
[2018-10-31T15:08:09.917506 #347] FATAL -- : lib/redmine/menu_manager/top_menu/projects_menu.rb:50:in render\_projects_dropdown' lib/redmine/menu\_manager/top\_menu/projects\_menu.rb:37:in
render_projects_top_menu_node'
lib/redmine/menu_manager/top_menu_helper.rb:38:in block in render\_top\_menu\_left' lib/redmine/menu\_manager/top\_menu\_helper.rb:36:in
render_top_menu_left'
app/views/layouts/base.html.erb:119:in \_app\_views\_layouts\_base\_html\_erb\_\_391183132604815351\_47030139658120' app/views/layouts/no\_menu.html.erb:30:in
_app_views_layouts_no_menu_html_erb___981555086645692541_47030140761820'
app/controllers/projects_controller.rb:82:in new' app/middleware/reset\_current\_user.rb:47:in
call'
Replies (6)
Hi
Can anyone help with this. It started with an error when creating new projects, but now the issue is for copy project as well. It was working fine in earlier versions. Not sure where the error is. Is it something to do with db? A bug in the code? Where should I look for possible solutions?
Here is the error when I try to create new project from Dashboard:
I, [2019-01-20T12:16:30.891447 #13724] INFO -- : Started GET "/projects/new" for 87.248.16.38 at 2019-01-20 12:16:30 +0100
I, [2019-01-20T12:16:30.894010 #13724] INFO -- : Processing by ProjectsController#new as HTML
I, [2019-01-20T12:16:30.897998 #13724] INFO -- : OpenProject User: Username (user@user.com ID: 5 <user@user.com>)
I, [2019-01-20T12:16:30.909447 #13724] INFO -- : Rendering projects/new.html.erb within layouts/no_menu
I, [2019-01-20T12:16:30.918214 #13724] INFO -- : Rendered projects/form/attributes/_name.html.erb (7.3ms)
I, [2019-01-20T12:16:30.918365 #13724] INFO -- : Rendered projects/form/_project_attributes.html.erb (7.6ms)
I, [2019-01-20T12:16:30.918495 #13724] INFO -- : Rendered projects/_form.html.erb (8.0ms)
I, [2019-01-20T12:16:30.918626 #13724] INFO -- : Rendered projects/new.html.erb within layouts/no_menu (9.0ms)
I, [2019-01-20T12:16:30.918890 #13724] INFO -- : Completed 500 Internal Server Error in 25ms (ActiveRecord: 1.3ms)
F, [2019-01-20T12:16:30.919962 #13724] FATAL -- :
F, [2019-01-20T12:16:30.920065 #13724] FATAL -- : ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
F, [2019-01-20T12:16:30.920225 #13724] FATAL -- : 29:
30: <div class="form--field -required">
31: <%= form.text_field :name, required: true,
32: autofocus: form.object.name.empty?,
33: container_class: '-wide' %>
34: </div>
F, [2019-01-20T12:16:30.920319 #13724] FATAL -- :
F, [2019-01-20T12:16:30.920393 #13724] FATAL -- : app/views/projects/form/attributes/_name.html.erb:32:in `_app_views_projects_form_attributes__name_html_erb__53901246277506064_47377336444220'
app/views/projects/form/_project_attributes.html.erb:31:in `_app_views_projects_form__project_attributes_html_erb__2209896172595052376_47377336485800'
app/views/projects/_form.html.erb:35:in `_app_views_projects__form_html_erb__298365015574310536_47377336562860'
app/views/projects/new.html.erb:32:in `block in _app_views_projects_new_html_erb__65922197900838093_47377316194260'
app/helpers/application_helper.rb:364:in `labelled_tabular_form_for'
app/views/projects/new.html.erb:31:in `_app_views_projects_new_html_erb__65922197900838093_47377316194260'
app/controllers/projects_controller.rb:82:in `new'
app/middleware/reset_current_user.rb:47:in `call'
Thanks.
I have the same problem.
Mar 13 10:01:43 projects openproject-web-1.service[1212]: I, [2019-03-13T10:01:43.942222 #25242] INFO -- : method=GET path=/projects/new format=html controller=ProjectsController action=new status=500 error='ActionView::Template::Error: undefined method `empty?' for nil:NilClass' duration=38.98 view=0.00 db=0.91 user=9
Mar 13 10:01:43 projects openproject-web-1.service[1212]: F, [2019-03-13T10:01:43.945027 #25242] FATAL -- :
Mar 13 10:01:43 projects openproject-web-1.service[1212]: F, [2019-03-13T10:01:43.945564 #25242] FATAL -- : ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
Mar 13 10:01:43 projects openproject-web-1.service[1212]: F, [2019-03-13T10:01:43.946244 #25242] FATAL -- : 29:
Mar 13 10:01:43 projects openproject-web-1.service[1212]: 30: <div class="form--field -required">
Mar 13 10:01:43 projects openproject-web-1.service[1212]: 31: <%= form.text_field :name, required: true,
Mar 13 10:01:43 projects openproject-web-1.service[1212]: 32: autofocus: form.object.name.empty?,
Mar 13 10:01:43 projects openproject-web-1.service[1212]: 33: container_class: '-wide' %>
Mar 13 10:01:43 projects openproject-web-1.service[1212]: 34: </div>
Mar 13 10:01:43 projects openproject-web-1.service[1212]: F, [2019-03-13T10:01:43.948052 #25242] FATAL -- :
Mar 13 10:01:43 projects openproject-web-1.service[1212]: F, [2019-03-13T10:01:43.948578 #25242] FATAL -- : app/views/projects/form/attributes/_name.html.erb:32:in `_app_views_projects_form_attributes__name_html_erb__4308524058191680658_47075435859500'
Mar 13 10:01:43 projects openproject-web-1.service[1212]: app/views/projects/form/_project_attributes.html.erb:31:in `_app_views_projects_form__project_attributes_html_erb__3187557602515484492_47075435833260'
Mar 13 10:01:43 projects openproject-web-1.service[1212]: app/views/projects/_form.html.erb:35:in `_app_views_projects__form_html_erb__962511087116937649_47075435810860'
Mar 13 10:01:43 projects openproject-web-1.service[1212]: app/views/projects/new.html.erb:32:in `block in _app_views_projects_new_html_erb___747583161623580358_47075435789500'
Mar 13 10:01:43 projects openproject-web-1.service[1212]: app/helpers/application_helper.rb:353:in `labelled_tabular_form_for'
Mar 13 10:01:43 projects openproject-web-1.service[1212]: app/views/projects/new.html.erb:31:in `_app_views_projects_new_html_erb___747583161623580358_47075435789500'
Mar 13 10:01:43 projects openproject-web-1.service[1212]: app/controllers/projects_controller.rb:82:in `new'
Mar 13 10:01:43 projects openproject-web-1.service[1212]: app/middleware/reset_current_user.rb:47:in `call'
Hi, I ended up reinstalling fresh, in ubuntu 18.04, now it works.
Just imported data and files.
Regards,
Thank, I'll try to reinstall on new ubuntu.
Maybe it's linked to Ubuntu 16.04
I continue to notice the same problem also on a new installation.
Now I migrate all to PostgreSQL, the server is Ubuntu 18.04, and openproject is the 10.0.3
All working ok, but creating new project.
Here the actual log:
If someone have the same problem, using the CLI with the following command you can create a new project:
Using the CLI I still notice the 500 internal error with the previous log.