tdvsdv / unread_issues

Redmine unread_issues
20 stars 21 forks source link

Ajax counters affects plugin :( #18

Closed dominch closed 9 years ago

dominch commented 9 years ago

Just installed ajax counters and plugin is broken :(

Redmine. Error 500
Global_error
undefined method `issues' for nil:NilClass

bottom error logs:

Error log

      /var/data/redmine_test/plugins/unread_issues/app/controllers/issue_reads_controller.rb:26:in `count'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/actionpack-3.2.21/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:167:in `process_action'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/actionpack-3.2.21/lib/action_controller/metal/rendering.rb:10:in `process_action'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:579:in `_run__3192481702536355075__process_action__119380510722706719__callbacks'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/usr/local/rvm/gems/ruby-2.0.0-p594/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'

without ajax counters it's working ok.

We are trying few paid plugins, ajax counters came with my magic page or kpi? Both unread issues and ajax counters were upt to date from git.

SkiF91 commented 9 years ago

Hello. Thank for bug report. I fixed the bug, please, update the unread_issues plugin. Reason of bug: settings of query for counters was blank. If you want to use unread_issues with ajax_counters you need to set settings of unread_issues else counters will be blank. Or just use unread_issues without ajax_counters. We know, that not cool and soon we will make one mechanism for counters.

dominch commented 9 years ago

After update it's working now. Thanks!