hdgarrood / redmine_release_notes

A plugin to add release notes to Redmine
GNU General Public License v3.0
73 stars 47 forks source link

internal 500 error #110

Open sporch08 opened 10 years ago

sporch08 commented 10 years ago

First, thank you for provide this nice tool for us, but I have some problem to use it. I follow up the instruction to install this plugin, but I can't see tab "Release notes" on my project. and when I clicked version link of the tab: "Roadmap", the error occurs. detail error message as below:

Started GET "/versions/31" for 10.20.64.176 at 2014-01-17 11:28:51 +0800 Processing by VersionsController#show as HTML Parameters: {"id"=>"31"} Current user: admin (id=1) Rendered versions/_overview.html.erb (15.6ms) Rendered versions/_issue_counts.html.erb (0.0ms) Rendered plugins/redmine_release_notes/app/views/release_notes/_dashboard.html.erb (31.3ms) Rendered plugins/redmine_release_notes/app/views/hooks/release_notes/_version_show_bottom.html.erb (31.3ms) Rendered versions/show.html.erb within layouts/base (62.5ms) Completed 500 Internal Server Error in 94ms

ActionView::Template::Error (undefined method name' for nil:NilClass): 1: <% stats = version.release_notes_stats %> 2: <% cf_none_value = Setting.plugin_redmine_release_notes[:field_value_not_required] %> 3: <% cf_name = CustomField.find_by_id(Setting.plugin_redmine_release_notes[:issue_custom_field_id]).name %> 4: 5: <fieldset id="release-notes-completion"> 6: <legend><%= l('release_notes.progress') %></legend> lib/redmine/hook.rb:61:inblock (2 levels) in call_hook' lib/redmine/hook.rb:61:in each' lib/redmine/hook.rb:61:inblock in call_hook' lib/redmine/hook.rb:58:in tap' lib/redmine/hook.rb:58:incall_hook' lib/redmine/hook.rb:158:in call_hook' app/views/versions/show.html.erb:52:in_app_views_versions_show_html_erb___535711117_26868348'

another question, when I trying to uninstall this plugin, but it seems not work, the error message as below:

D:\redmine-2.3.3>rake redmine:plugins:migrate NAME=redmine_releas e_notes VERSION=0 RAILS_ENV=production Migrating redmine_release_notes (Redmine release notes plugin)... == DoEverythingForVersion131: reverting ====================================== -- change_table(:release_notes) rake aborted! An error has occurred, all later migrations canceled:

Mysql2::Error: Duplicate column name 'status': ALTER TABLE release_notes ADD status varchar(12)D:/redmine-2.3.3/plugins/redmine_release_notes /db/migrate/004_do_everything_for_version_131.rb:30:in block in down' D://redmine-2.3.3/plugins/redmine_release_notes/db/migrate/004_do_ everything_for_version_131.rb:29:indown' D:in migrate' D:/redmine-2.3.3/lib/redmine/plugin.rb:453:inmigrate_plugin' D:/redmine-2.3.3/lib/redmine/plugin.rb:425:in migrate' D:/redmine-2.3.3/lib/redmine/plugin.rb:436:inmigrate' D:/redmine-2.3.3/lib/tasks/redmine.rake:74:in `block (3 levels) i n <top (required)>' Tasks: TOP => redmine:plugins:migrate (See full trace by running task with --trace)

my redmine version is 2.3.3, and os platform is windows x86. Please give me some advice to use it or to uninstall it, thank you.

matrixbegins commented 10 years ago

Thats correct. I am using Redmine version 2.4.2. and I am facing the same issue. But I am on linux.

Started GET "/versions/1" for 127.0.0.1 at 2014-01-23 15:49:06 +0000
Processing by VersionsController#show as HTML
  Parameters: {"id"=>"1"}
  Current user: admin (id=1)
  Rendered versions/_issue_counts.html.erb (2.5ms)
  Rendered versions/_overview.html.erb (9.8ms)
  Rendered plugins/advanced_roadmap/app/views/versions/_info.html.erb (67.5ms)
  Rendered plugins/redmine_release_notes/app/views/release_notes/_dashboard.html.erb (99.8ms)
  Rendered plugins/redmine_release_notes/app/views/hooks/release_notes/_version_show_bottom.html.erb (100.4ms)
  Rendered plugins/advanced_roadmap/app/views/versions/show.html.erb within layouts/base (216.6ms)
Completed 500 Internal Server Error in 265.8ms

ActionView::Template::Error (undefined method `name' for nil:NilClass):
    1: <% stats = version.release_notes_stats %>
    2: <% cf_none_value =  Setting.plugin_redmine_release_notes[:field_value_not_required] %>
    3: <% cf_name = CustomField.find_by_id(Setting.plugin_redmine_release_notes[:issue_custom_field_id]).name %> 
    4: 
    5: <fieldset id="release-notes-completion">
    6:   <legend><%= l('release_notes.progress') %></legend>
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:158:in `call_hook'

Any help in this direction is much appreciated.

hdgarrood commented 10 years ago

Did you follow all the steps for setup in the readme?

Before you can use it, you need to:

  • Do first-time configuration (See Administration > Plugins > Redmine release notes > Configure)
  • Enable the release notes module for any relevant projects
  • Enable the release notes custom field for the appropriate trackers
matrixbegins commented 10 years ago

@hdgarrood I Followed All three Steps. My Custom Field Name is Release Notes Status I mapped it to all trackers but now I got another error at Plugin configuration .

Started GET "/settings/plugin/redmine_release_notes" for 127.0.0.1 at 2014-01-18 14:54:49 +0000
Processing by SettingsController#plugin as HTML
  Parameters: {"id"=>"redmine_release_notes"}
  Current user: admin (id=1)
Completed 500 Internal Server Error in 360.6ms

SystemStackError (stack level too deep):
  activesupport (3.2.16) lib/active_support/callbacks.rb:409

This is the Error I am facing in all plugin config. So far Nobody told me how to trouble shoot/debug this issue. I am new to Ruby and rails. Can you please me how to log in application so that I can debug. I tried Rails.logger.error('mystr') but there was nothing in log/production.log

Then I read somewhere and changed reload_code=false or some parameter like that. After that my application stopped working.

hdgarrood commented 10 years ago

I'm sorry, I don't have time to look at this at the moment. Maybe the Redmine forums / stack overflow will be able to help you?

If you manage to fix it, I'd appreciate it if you could update this issue with details. :)

matrixbegins commented 10 years ago

Sorry man you mistook my intend

I understand you are busy. But at least just tell me how to enable logging in red mine, I can try to find reason or at least update you with some clues. That's all I ask. Guess i have to go for a crash course of ruby too. And of course I'll share my findings if I can fix this issue.

hdgarrood commented 10 years ago

I'm not sure what you mean by "enable logging" -- do you mean you want to be able to add debugging statements to the code so that a string will be appended to the log when the statements are executed?

matrixbegins commented 10 years ago

Right.. I tried with Rails.logger.error(). But there was nothing in production.log On Jan 24, 2014 9:06 PM, "Harry Garrood" notifications@github.com wrote:

I'm not sure what you mean by "enable logging" -- do you mean you want to be able to add debugging statements to the code so that a string will be appended to the log when the statements are executed?

— Reply to this email directly or view it on GitHubhttps://github.com/hdgarrood/redmine_release_notes/issues/110#issuecomment-33232543 .

hdgarrood commented 10 years ago

I'm sorry, I haven't actually administrated any Rails apps for quite a while now, and I don't remember. Some googling suggests doing just logger.error "whatever" -- does that work?

hdgarrood commented 10 years ago

PR #111 should fix this.

pbininda commented 10 years ago

Sorry, I mentioned the wrong Issue. The pull request actually fixes #109. This issue should probably be reopened and #109 closed instead.

hdgarrood commented 10 years ago

oh, silly me, you're right

sporch08 commented 10 years ago

Sorry that I am response too late, my feedback as below: 01.I am sure that I am follow the instruction to setup this plugin

When I complete actions as above and click version link from tab road map, I get errors. I tried to re-install this plugin but it's not work. I can't uninstall by following command:

rake redmine:plugins:migrate NAME=redmine_release_notes VERSION=0 RAILS_ENV=production

Is any body can share something how to remove this plugin and re-install ?

matrixbegins commented 10 years ago

I suppose remove the plugin dir under /plugins and then rake redmine:plugins:migrate RAILS_ENV=production And restart ... very important :)

sporch08 commented 10 years ago

to matrixbegins, thank you for your support, but if I remove folder and restart after rake command, the data and tables will remain on your database, right? if so, when you re-install again, all of the config won't back to initial status, the problem still exist :(

matrixbegins commented 10 years ago

@sporch08 you are right man. But thats the only way I can think of as Downgrading to VERSION=0 doesn't seems to be working.

hdgarrood commented 10 years ago

No...

Do first-time configuration (See Administration > Plugins > Redmine release notes > Configure)

This means within Redmine.