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

Error 500 with hierarchical projects #1

Open KlausAdler opened 11 years ago

KlausAdler commented 11 years ago

Error 500 is shown, when the issue list is displayed. It occures with hierarchical project, when there are subprojects existing

ghost commented 11 years ago

Thanks for the report. I'll see if I can replicate this and fix it.

ghost commented 11 years ago

I can't replicate this issue. Are you sure you have the latest version (0.0.1) that I committed on 5/3/2013 commit 12f1db4 ? If so, can you provide me details as to how your project(s) and issue(s) are set up? Also any other plugins you have installed.

ghost commented 11 years ago

Just a note as I adjusted my username which changed the URL and they don't do 301/302 redirects for old usernames.

KlausAdler commented 11 years ago

Hello

My configuration: [cid:463344213@06052013-06FE] For this test, I removed all plugins

My projects (only a part of a bigger project tree) _Test is top level project [cid:463344213@06052013-0705]

Issues for _Test (displayed without your plugin): [cid:463344213@06052013-070C]

The subprojects has no issues: [cid:463344213@06052013-0713]

Show the Issues for _Test (with your plugin) will lead to the following error: I newly downloaded the plugin from github. [cid:463344213@06052013-071A]

Until now I don't use the features, provided by your plugin. I use only the standard categries provided by redmine.

Best regards

Klaus Adler


Von: brett-patterson-mss [mailto:notifications@github.com] Gesendet: Montag, 6. Mai 2013 15:11 An: brett-patterson-mss/redmine_category_tree Cc: Adler Klaus Betreff: Re: [redmine_category_tree] Error 500 with hierarchical projects (#1)

I can't replicate this issue. Are you sure you have the latest version (0.0.1) that I committed on 5/3/2013 commit 12f1db4https://github.com/brett-patterson-mss/redmine_category_tree/commit/12f1db4 ? If so, can you provide me details as to how your project(s) and issue(s) are set up? Also any other plugins you have installed.

Reply to this email directly or view it on GitHubhttps://github.com/brett-patterson-mss/redmine_category_tree/issues/1#issuecomment-17480543.

ghost commented 11 years ago

Thanks. I'll keep looking into it.

badmingtoncedric commented 11 years ago

Hi,

I have same problem when i would open any issue

Started GET "/issues/" for ...* at 2013-05-09 10:47:35 +0200 Processing by IssuesController#show as HTML Parameters: {"id"=>""} Current user: Alezaru (id=) Rendered issues/_action_menu.html.erb (23.0ms) Rendered plugins/redmine_issue_checklist/app/views/issues/_checklist.html.erb (30.4ms) Rendered issue_relations/_form.html.erb (10.3ms) Rendered issues/_relations.html.erb (31.8ms) Rendered issues/_action_menu.html.erb (9.2ms) Rendered plugins/redmine_category_tree/app/views/issues/_attributes.html.erb (56.8ms) Rendered issues/_form.html.erb (144.2ms) Rendered issues/_edit.html.erb (165.3ms) Rendered plugins/redmine_category_tree/app/views/issues/show.html.erb within layouts/base (725.8ms) Completed 500 Internal Server Error in 1259ms

ActionView::Template::Error (undefined method <' for nil:NilClass): 19: <% end %> 20: 21: <% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %> 22: <p><%= f.select :category_id, issue_category_tree_options_for_select(@issue.project.issue_categories, :selected => @issue.category_id), :include_blank => true, :required => @issue.required_attribute?('cate gory_id') %> 23: <%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'), 24: new_project_issue_category_path(@issue.project), 25: :remote => true, lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:306:inis_descendant_of?' app/helpers/application_helper.rb:959:in labelled_fields_for' app/views/issues/_form.html.erb:41:inblock in _' app/helpers/application_helper.rb:959:in labelled_fields_for' app/views/issues/_form.html.erb:1:in_' app/views/issues/edit.html.erb:8:in `block in ' app/helpers/application_helper.rb:952:inlabelled_form_for' app/views/issues/_edit.html.erb:1:in_aff' app/controllers/issues_controller.rb:121:inblock (2 levels) in show' app/controllers/issues_controller.rb:118:inshow'

if that's can help..

KappaNossi commented 11 years ago

I'm having similar problems and in most cases it can be traced back to the render_issue_category_with_tree method being called with nil instead of a category. This is because issues' category attribute is passed as parameter even when it's not set.

ghost commented 11 years ago

Merged KappaNossi's fix. Please test and see if these issues persist.

KlausAdler commented 11 years ago

The Problem is solved. Thanks

badmingtoncedric commented 11 years ago

Not for me :(

Rendered plugins/redmine_category_tree/app/views/issues/show.html.erb within layouts/base (606.3ms) Completed 500 Internal Server Error in 1473ms

ActionView::Template::Error (undefined method <' for nil:NilClass): 19: <% end %> 20: 21: <% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %> 22: <p><%= f.select :category_id, issue_category_tree_options_for_select(@issue.project.issue_categories, :selected => @issue.category_id), :include_blank => true, :required => @issue.required_attribute?('category_id') %> 23: <%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'), 24: new_project_issue_category_path(@issue.project), 25: :remote => true, lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:306:inis_descendant_of?' app/helpers/application_helper.rb:959:in labelled_fields_for' app/views/issues/_form.html.erb:41:inblock in _b6fcb0d4c17fd286b425d6b8eb00d0fe' app/helpers/application_helper.rb:959:in labelled_fields_for' app/views/issues/_form.html.erb:1:in_b6fcb0d4c17fd286b425d6b8eb00d0fe' app/views/issues/_edit.html.erb:8:in block in _e7ccc30af4ea2efcf965319e38646460' app/helpers/application_helper.rb:952:inlabelled_form_for' app/views/issues/_edit.html.erb:1:in _e7ccc30af4ea2efcf965319e38646460' app/controllers/issues_controller.rb:121:inblock (2 levels) in show' app/controllers/issues_controller.rb:118:in `show'

General config :

Environment: Redmine version 2.3.1.devel Ruby version 1.9.2 (x86_64-linux) Rails version 3.2.13 Environment production Database adapter Mysql2 Redmine plugins: redmine_backlogs v1.0.1 redmine_favorite_projects 1.0.1 redmine_information 1.0.2 redmine_inline_attach_screenshot 0.4.2 redmine_issue_checklist 2.0.5 redmine_issue_templates 0.0.5 redmine_logs 0.0.5 redmine_my_page_queries 0.0.3 redmine_mylyn_connector 2.8.2.stable redmine_people 0.1.6 redmine_questions 0.0.4 redmine_watcher_groups 0.0.1 redmine_wiki_notes 0.0.1

and obv redmine_category_tree 0.0.2 if u have any tips ... :(

ghost commented 11 years ago

pokooz please download the latest (it's still 0.0.2 as I have not made any DB changes). I can't reproduce your exact error. If you are willing, I would accept a database dump and zip of your redmine installation (sans everything in the "files" directory) so that I could replicate your exact setup locally and see if I can see that issue again.

ghost commented 10 years ago

I can't replicate this issue using Redmine 2.4.4 and the latest version. My previous offer still stands if you can give me a DB dump.