Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • News
    • Boards
    • Team planners
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Feature tour
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Expanded. Click to collapseCollapsed. Click to showWiki
        • Hierarchy leaf2nd Level Support
You are here:
  • Forums
  • Support Installation & Updates

Content

Create project fails, 500 Error in 8.10

Added by Eirik S over 4 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)

RE: Create project fails, 500 Error in 8.10 and 8.2 - Added by Vitali . over 4 years ago

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.

RE: Create project fails, 500 Error in 8.10 - Added by Nico Aymet about 4 years ago

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'

RE: Create project fails, 500 Error in 8.10 - Added by Eirik S about 4 years ago

Hi, I ended up reinstalling fresh, in ubuntu 18.04, now it works.

Just imported data and files.

Regards,

RE: Create project fails, 500 Error in 8.10 - Added by Nico Aymet about 4 years ago

Thank, I'll try to reinstall on new ubuntu.

Maybe it's linked to Ubuntu 16.04

RE: Create project fails, 500 Error in 10.0.3 - Added by Nico Aymet over 3 years ago

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:

Oct  7 09:26:29 projects openproject-web-1.service[792]: E, [2019-10-07T09:26:29.324340 #1902] ERROR -- : [current_user=Nico Aymet] undefined method `empty?' for nil:NilClass: undefined method `empty?' for nil:NilClass
Oct  7 09:26:29 projects openproject-web-1.service[792]: I, [2019-10-07T09:26:29.388791 #1902]  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=131.34 view=0.00 db=7.70 user=9
Oct  7 09:26:29 projects openproject-web-1.service[792]: F, [2019-10-07T09:26:29.392719 #1902] FATAL -- :
Oct  7 09:26:29 projects openproject-web-1.service[792]: F, [2019-10-07T09:26:29.395379 #1902] FATAL -- : ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
Oct  7 09:26:29 projects openproject-web-1.service[792]: F, [2019-10-07T09:26:29.396173 #1902] FATAL -- :     129:              aria-label="<%= I18n.t('js.work_packages.jump_marks.label_content') %>">
Oct  7 09:26:29 projects openproject-web-1.service[792]:     130:             <%= I18n.t('js.work_packages.jump_marks.content') %>
Oct  7 09:26:29 projects openproject-web-1.service[792]:     131:           </a>
Oct  7 09:26:29 projects openproject-web-1.service[792]:     132:           <%= render_top_menu_left %>
Oct  7 09:26:29 projects openproject-web-1.service[792]:     133:           <div id="logo" class="hidden-for-mobile">
Oct  7 09:26:29 projects openproject-web-1.service[792]:     134:             <%= link_to(I18n.t('label_home'), fixed_home_url, class: 'home-link') %>
Oct  7 09:26:29 projects openproject-web-1.service[792]:     135:           </div>
Oct  7 09:26:29 projects openproject-web-1.service[792]: F, [2019-10-07T09:26:29.397586 #1902] FATAL -- :
Oct  7 09:26:29 projects openproject-web-1.service[792]: F, [2019-10-07T09:26:29.397954 #1902] FATAL -- : lib/redmine/menu_manager/top_menu/projects_menu.rb:40:in `render_projects_dropdown'
Oct  7 09:26:29 projects openproject-web-1.service[792]: lib/redmine/menu_manager/top_menu/projects_menu.rb:34:in `render_projects_top_menu_node'
Oct  7 09:26:29 projects openproject-web-1.service[792]: lib/redmine/menu_manager/top_menu_helper.rb:38:in `block in render_top_menu_left'
Oct  7 09:26:29 projects openproject-web-1.service[792]: lib/redmine/menu_manager/top_menu_helper.rb:36:in `render_top_menu_left'
Oct  7 09:26:29 projects openproject-web-1.service[792]: app/views/layouts/base.html.erb:132:in `_app_views_layouts_base_html_erb___103680947248945546_47378578312000'
Oct  7 09:26:29 projects openproject-web-1.service[792]: app/views/layouts/no_menu.html.erb:30:in `_app_views_layouts_no_menu_html_erb___1603226223407392544_47378576511480'
Oct  7 09:26:29 projects openproject-web-1.service[792]: app/helpers/errors_helper.rb:99:in `block (2 levels) in render_error'
Oct  7 09:26:29 projects openproject-web-1.service[792]: app/helpers/errors_helper.rb:97:in `render_error'
Oct  7 09:26:29 projects openproject-web-1.service[792]: app/helpers/errors_helper.rb:59:in `render_500'
Oct  7 09:26:29 projects openproject-web-1.service[792]: app/controllers/application_controller.rb:115:in `block in <class:ApplicationController>'

RE: Create project fails, 500 Error in 10.0.3 - Added by Nico Aymet over 3 years ago

If someone have the same problem, using the CLI with the following command you can create a new project:

openproject run bundle exec rails runner 'Project.create! name: "Documentation", identifier: "a7-doc"'

Using the CLI I still notice the 500 internal error with the previous log.

  • (1 - 6/6)
Loading...