maxrossello / redmine_extended_watchers

Grant additional issue and project view permissions to watcher users
GNU General Public License v3.0
44 stars 20 forks source link

Plugin conflicts #27

Closed spbdimka closed 3 years ago

spbdimka commented 3 years ago

hi, i have conflict with a_common_libs plugin

plugins/a_common_libs/lib/acl/patches/models/user_patch.rb:158:in `allowed_to_with_acl?'
plugins/redmine_extended_watchers/lib/extended_watchers_user_patch.rb:23:in `allowed_to?'
plugins/additionals/app/models/additionals_macro.rb:48:in `block in build_permissions'
plugins/additionals/app/models/additionals_macro.rb:42:in `each'
plugins/additionals/app/models/additionals_macro.rb:42:in `build_permissions'
plugins/additionals/app/models/additionals_macro.rb:8:in `all'
plugins/additionals/lib/additionals/patches/formatting_helper_patch.rb:15:in `heads_for_wiki_formatter'
lib/redmine/wiki_formatting/textile/helper.rb:25:in `wikitoolbar_for'
app/views/settings/_general.html.erb:7:in `block in _9e6f2c850bdfa072b4e346d454608d7f'
app/views/settings/_general.html.erb:1:in `_9e6f2c850bdfa072b4e346d454608d7f'
app/views/common/_tabs.html.erb:21:in `block in _4a74d4eb3088a6fdd38e3b44939cda85'
app/views/common/_tabs.html.erb:20:in `each'
app/views/common/_tabs.html.erb:20:in `_4a74d4eb3088a6fdd38e3b44939cda85'
app/helpers/application_helper.rb:439:in `render_tabs'
app/views/settings/edit.html.erb:5:in `_6f66b20402664d3f8118a8e97e714f7e'
app/controllers/settings_controller.rb:33:in `index'

but even i deleted this plugin i got this log and stoped execution of redmine:

Starting Extended Watchers plugin for Redmine
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
Creating scope :visible. Overwriting existing method Principal.visible.
Creating scope :system. Overwriting existing method Enumeration.system.
maxrossello commented 3 years ago

You may want to try to completely uninstall the other plugin from database, doing a plugin migration with options NAME=plugin_name and VERSION=0

maxrossello commented 3 years ago

Other helpful action would be removing the plugin assets from public. Note that the plugin seems not compatible with Redmine 4.x. For other info you may want to contact the plugin developer. Good luck.

alterdaemon commented 3 years ago

I have managed to workaround the issue on my instance with just renaming ../plugins/a_common_libs/lib/acl/patches/models/issue_patch.rb into issuepatch.rb without practical negative consequences

In your case that may be ../plugins/a_common_libs/lib/acl/patches/models/user_patch.rb into userpatch.rb

But it's a bit risky, you may need to test it later to check if something else is off. Works for me.

maxrossello commented 3 years ago

I haven't looked into the plugin but the point is: allowed_to_with_acl implies the usage of alias_method_chain which is not supported by the Rails version used in Redmine 4.x. The plugin is incompatible with Redmine 4.x, fullstop.

The question by @spbdimka was about how to uninstall the plugin, because it seems to harm even if removed. Of course Redmine needs to be restarted, and I suggested some further cleanup actions above.