hidakatsuya / redmine_default_custom_query

Redmine plugin for setting default custom query of Issues for each project
http://www.redmine.org/plugins/redmine_default_custom_query
MIT License
72 stars 20 forks source link

Error in Redmine 3.4.1 #30

Closed pboese closed 7 years ago

pboese commented 7 years ago

I'm getting this error. Is it because the plugin only works with Redmine 3.3?

Started GET "/projects/gfdk/settings" for 127.0.0.1 at 2017-07-12 15:34:04 +0200
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"gfdk"}
  Current user: admin (id=1)
  Rendered projects/_form.html.erb (15.0ms)
  Rendered projects/_edit.html.erb (16.1ms)
  Rendered projects/settings/_modules.html.erb (4.1ms)
  Rendered projects/settings/_members.html.erb (12.1ms)
  Rendered projects/settings/_versions.html.erb (1.8ms)
  Rendered projects/settings/_issue_categories.html.erb (1.7ms)
  Rendered projects/settings/_wiki.html.erb (1.1ms)
  Rendered plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb (9.3ms)
  Rendered common/_tabs.html.erb (50.0ms)
  Rendered projects/settings.html.erb within layouts/base (51.9ms)
Completed 500 Internal Server Error in 114ms (ActiveRecord: 59.7ms)

ActionView::Template::Error (undefined method `only_public' for #<ActiveRecord::Associations::CollectionProxy []>):
     7:
     8:   <div class="box tabular">
     9:     <p>
    10:       <%= f.select :query_id, options_for_selectable_queries(@project), include_blank: true %><br>
    11:       <em><%=l 'default_custom_query.text_allowed_queries' %></em>
    12:     </p>
    13:   </div>
  plugins/redmine_default_custom_query/app/helpers/default_custom_query_helper.rb:10:in `options_for_selectable_queries'
  plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb:10:in `block in _plugins_redmine_default_custom_query_app_views_default_custom_query_setting__form_html_erb__1205119961705873908_70005567268020'
  app/helpers/application_helper.rb:1188:in `labelled_form_for'
  plugins/redmine_default_custom_query/app/views/default_custom_query_setting/_form.html.erb:1:in `_plugins_redmine_default_custom_query_app_views_default_custom_query_setting__form_html_erb__1205119961705873908_70005567268020'
  app/views/common/_tabs.html.erb:17:in `block in _app_views_common__tabs_html_erb__1467103625908126477_24963420'
  app/views/common/_tabs.html.erb:16:in `each'
  app/views/common/_tabs.html.erb:16:in `_app_views_common__tabs_html_erb__1467103625908126477_24963420'
  app/helpers/application_helper.rb:343:in `render_tabs'
  app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb__3619103283396159448_26060020'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
pboese commented 7 years ago

Also I can't uninstall the plugin without getting errors :-(

Started GET "/projects/gfdk/issues?set_filter=1&tracker_id=1" for 127.0.0.1 at 2017-07-12 15:33:03 +0200
Processing by IssuesController#index as HTML
  Parameters: {"set_filter"=>"1", "tracker_id"=>"1", "project_id"=>"gfdk"}
  Current user: admin (id=1)
Completed 500 Internal Server Error in 36ms (ActiveRecord: 28.1ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Table 'redmine.projects_default_queries' doesn't exist: SHOW FULL FIELDS FROM `projects_default_queries`):
  plugins/redmine_default_custom_query/app/patches/models/project_patch.rb:16:in `default_query'
  plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:53:in `find_default_query'
  plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:57:in `apply_default_query!'
  plugins/redmine_default_custom_query/app/patches/controllers/issues_controller_patch.rb:27:in `with_default_query'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
hidakatsuya commented 7 years ago

I believe that this problem is related the #29.

Also I can't uninstall the plugin without getting errors :

Did you restart after uninstallation?

hidakatsuya commented 7 years ago

Fixed #29

hidakatsuya commented 7 years ago

Thank you for your reporting.

pboese commented 7 years ago

Awesome, works perfectly fine! Thanks a lot!