teleological / redmine_stealth

Sometimes sneaky is good. This plugin works like a mute button for Redmine notification emails.
http://teleological.github.com/redmine_stealth
GNU General Public License v2.0
31 stars 35 forks source link

Support Redmine 2.4.2 #30

Closed potsky closed 2 years ago

potsky commented 10 years ago

Migrating to Redmine 2.4.2 make the plugin crash on update:

rake aborted!
no implicit conversion of nil into String
/home/redmine-2.4.2/plugins/redmine_stealth/init.rb:24:in `join'
/home/redmine-2.4.2/plugins/redmine_stealth/init.rb:24:in `block in <top (required)>'
/home/redmine-2.4.2/lib/redmine/plugin.rb:73:in `instance_eval'
/home/redmine-2.4.2/lib/redmine/plugin.rb:73:in `register'
/home/redmine-2.4.2/plugins/redmine_stealth/init.rb:19:in `<top (required)>'
/home/redmine-2.4.2/lib/redmine/plugin.rb:133:in `block in load'
/home/redmine-2.4.2/lib/redmine/plugin.rb:124:in `each'
/home/redmine-2.4.2/lib/redmine/plugin.rb:124:in `load'
/home/redmine-2.4.2/config/initializers/30-redmine.rb:19:in `<top (required)>'
/home/redmine-2.4.2/config/environment.rb:14:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

I have changed the directory variable with the current path of the file.

yakatz commented 10 years ago

Is this really correct? Since the code says respond_to?(:directory) ?, shouldn't that mean that directory is always set?

More specifically, what changed in 2.4?

yakatz commented 10 years ago

Found what changed: Default plugin directory is now set after plugin init so that plugins can set custom directory names (r11766 - https://github.com/edavis10/redmine/commit/e771d68214e7a83b7a4986e91faf5db15a04374a).

In general, this line should not be necessary any more since Redmine will now automatically load the I18N files (/lib/redmine/plugin.rb Line 82)

I will test some time next week.

potsky commented 10 years ago

ok !

sanderboom commented 10 years ago

Also relevant for 2.5.0

vetmedeu commented 10 years ago

Are there any news on this topic?

isGabe commented 10 years ago

+1

I had this same issue trying to install the plugin with Redmine 2.5.1, and this patch resolved it.

min2sia commented 9 years ago

Many thanks! Works like a charm on Redmine 2.5.2.