bap14 / redmine_category_tree

Module for Redmine to allow categories to be a tree instead of a single-list
18 stars 21 forks source link

500 error when creating a new category #5

Open kean-stump-tfs opened 11 years ago

kean-stump-tfs commented 11 years ago

I created a new category with no problems. Creating a second category throws this:

Started GET "/projects/asdfasdfasdfasdf/issue_categories/new" for 10.150.46.103 at Fri May 24 10:27:40 -0700 2013 Processing by IssueCategoriesController#new as HTML Parameters: {"project_id"=>"testproj"} Current user: admin (id=1) Rendered plugins/redmine_category_tree/app/views/issue_categories/_form.html.erb (6.5ms) Rendered issue_categories/new.html.erb within layouts/base (7.4ms) Completed 500 Internal Server Error in 17ms

ActionView::Template::Error (comparison of Fixnum with nil failed): 3:

4:

<%= f.text_field :name, :size => 30, :required => true %>

5:

<%= f.select :assigned_to_id, principals_options_for_select(@project.assignable_users, @category.assigned_to), :include_blank => true %>

6:

<%= f.select :parent_id, issue_category_tree_options_for_select(@project.issue_categories, { :current => @category, :selected => @category.parent_id }), :label => :label_issue_category_parent_id, :include_blank => true %>

7:
app/views/issue_categories/new.html.erb:5:in _app_views_issue_categories_new_html_erb___1838691348_70358496587840' app/helpers/application_helper.rb:948:inlabelled_form_for' app/views/issue_categories/new.html.erb:3:in _app_views_issue_categories_new_html_erb___1838691348_70358496587840' app/controllers/issue_categories_controller.rb:45:innew'

Information: CentOS 6.4 x64 Redmine 2.3.1 redmine_category_tree current rev (today) ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Anything else you need to know?

KappaNossi commented 11 years ago

Are you 100% sure that you took the most current version? That error sounds awfully familiar to one, which was recently fixed. Also, the 'new' method of the IssueCategoriesController is overridden by the plugin, which shouldn't allow Redmine to call the original 'new' method as the last line in your log indicates.

Did you apply any changes to your Redmine installation (codewise) without properly restarting the application and/or using the development environment? This sometimes unloads the patches.

jmbarrios commented 11 years ago

Hi have the same problem with today version. I clone the repository and move the folder to my plugins directory. Then I run a db plugins migration.

  Rendered plugins/redmine_category_tree/app/views/issue_categories/_form.html.erb (92.5ms)
  Rendered issue_categories/new.html.erb within layouts/base (93.4ms)
Completed 500 Internal Server Error in 103ms

ActionView::Template::Error (comparison of Fixnum with nil failed):
    3: <div class="box tabular">
    4: <p><%= f.text_field :name, :size => 30, :required => true %></p>
    5: <p><%= f.select :assigned_to_id, principals_options_for_select(@project.assignable_users, @category.assigned_to), :include_blank => true %></p>
    6: <p><%= f.select :parent_id, issue_category_tree_options_for_select(@project.issue_categories, { :current => @category, :selected => @category.parent_id }), :label => :label_issue_category_parent_id, :include_blank => true %></p>
    7: </div>
  app/views/issue_categories/new.html.erb:5:in `_app_views_issue_categories_new_html_erb___136109776__633953298'
  app/helpers/application_helper.rb:955:in `labelled_form_for'
  app/views/issue_categories/new.html.erb:3:in `_app_views_issue_categories_new_html_erb___136109776__633953298'
  app/controllers/issue_categories_controller.rb:45:in `new'

Ubuntu 12.04 Ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] Redmine 2.3.1.devel redmine_category_tree current rev (today)

kean-stump-tfs commented 11 years ago

I'm pretty sure I pulled the most current version. Tomorrow I'll walk through the install again on a clone of our server, make sure I'm doing the right thing.

ghost commented 11 years ago

Please pull the most current version again as some changes have been merged which may fix this. Thanks.

xeisiom commented 11 years ago

I too have had the same issue today. I get a 500 error when trying to create a new issue. Same error message as above.

Ruby 1.8.7 Redmine 2.3.1

ghost commented 10 years ago

I have created new categories on a clean install of 2.4.4 with the latest head version and had no issues.