Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project settings pages broken by pull request #18 #28

Open
earthgecko opened this issue Feb 18, 2015 · 1 comment
Open

project settings pages broken by pull request #18 #28

earthgecko opened this issue Feb 18, 2015 · 1 comment

Comments

@earthgecko
Copy link

We have the plugin installed at github commit reference (2246343) and it has been running fine on our redmine:

Environment:
Redmine version 2.2.4.stable.13138
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.13

The plugin migration worked fine and we are getting updates in our hipchat room.

However when trying to go to any project settings page we encounter an Internal Error page with the following log example:

Started GET "/projects/some_project/settings" for 123.124.125.126 at Wed Feb 18 15:59:06 +0000 2015
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"some_project"}
  Current user: [email protected] (id=6)
  Rendered plugins/redmine_hipchat/app/views/projects/_redmine_hipchat.html.erb (990.1ms)
  Rendered projects/_form.html.erb (1021.7ms)
  Rendered projects/_edit.html.erb (1023.2ms)
  Rendered common/_tabs.html.erb (1032.1ms)
  Rendered projects/settings.html.erb within layouts/base (1033.5ms)
Completed 500 Internal Server Error in 1072ms

ActionView::Template::Error (undefined method `plugin_settings_path' for #<#<Class:0x7f8df189a950>:0x7f8df0539230>):
    1: <p>
    2:   <%= form.text_field :hipchat_auth_token %>
    3:   A token from <a href="https://www.hipchat.com/group_admin/api" target="_blank">your API tokens page</a>. Leave empty to use <%= link_to 'global settings', plugin_settings_path(:redmine_hipchat) %>.
    4: </p>
    5:
    6: <p>
  lib/redmine/hook.rb:111:in `send'
  lib/redmine/hook.rb:111:in `view_projects_form'
  lib/redmine/hook.rb:61:in `send'
  lib/redmine/hook.rb:61:in `call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61: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'
  app/views/projects/_form.html.erb:23:in `_app_views_projects__form_html_erb__1437973132_70123809544180'
  app/views/projects/_edit.html.erb:2:in `_app_views_projects__edit_html_erb__2125876322_70123809569400'
  app/helpers/application_helper.rb:991:in `labelled_form_for'
  app/views/projects/_edit.html.erb:1:in `_app_views_projects__edit_html_erb__2125876322_70123809569400'
  app/views/common/_tabs.html.erb:24:in `_app_views_common__tabs_html_erb___168221978_70123809663160'
  app/views/common/_tabs.html.erb:23:in `each'
  app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb___168221978_70123809663160'
  app/helpers/application_helper.rb:263:in `render_tabs'
  app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb__367848628_70123809704800'

After some debugging and browsing through the code here on github, it appears that pull request #18 is the culprit - #18

Modifying app/views/projects/_redmine_hipchat.html.erb and reverting the #18 change gets all the project settings pages working again:

Changing:

Leave empty to use <%= link_to 'global settings', plugin_settings_path(redmine_hipchat) %>.

to:

Leave empty to use global settings.

This allows the token and room id to be set per project again.

@getit4free
Copy link

Same problem here... you can even keep the link if you hard-code it to '/settings/plugin/redmine_hipchat' instead of hte plugin_settings_path call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants