Closed chrislockwood closed 1 year ago
Environment:
Redmine version 4.1.1.stable
Ruby version 2.6.6-p146 (2020-03-31) [x64-mingw32]
Rails version 5.2.4.2
Environment production
Database adapter SQLServer
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Git 2.29.2
Filesystem
Redmine plugins:
additionals 3.0.2-master
redmine_banner 0.3.4
redmine_base_deface 1.5.3
redmine_base_stimulusjs 1.1.1
redmine_embed_html5_video 0.0.3
redmine_impersonate 2.0.0
redmine_mentions 0.0.1
redmine_multiprojects_issue 4.1.0
redmine_silencer 0.4.3
redmine_smile_project_enumerations_custom_field_format 1.3.14
redmine_sudo 1.0.0
redmine_theme_changer 0.4.0
Completed 500 Internal Server Error in 663ms (ActiveRecord: 330.1ms)
ActionView::Template::Error (super: no superclass method `column_content' for #<#<Class:0x000000000df9a710>:0x000000000cfb9b20>
Did you mean? column_content_without_tags):
33: <% end %>
34: <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
35: <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
36: <% query.inline_columns.each do |column| %>
37: <%= content_tag('td', column_content(column, issue), :class => column.css_classes) %>
38: <% end %>
39: <td class="buttons"><%= link_to_context_menu %></td>
plugins/redmine_multiprojects_issue/lib/redmine_multiprojects_issue/queries_helper_patch.rb:18:in `column_content'
plugins/additional_tags/lib/additional_tags/patches/queries_helper_patch.rb:35:in `column_content_with_tags'
plugins/redmine_multiprojects_issue/lib/redmine_multiprojects_issue/queries_helper_patch.rb:18:in `column_content'
Hi @chrislockwood
we use _aliasmethod here, because this is compatible with redmineup helpdesk plugin. Problem is, a plugin can use _aliasmethod or super - you have to decide to. redmine_multiprojects_issue uses super, which is the modern, preferred way.
The problem is, we cannot drop redmineup helpdesk support at the moment. I suppose there is no solution at the moment to use redmine_multiprojects_issue and additional_tags together.
Very much appreciate the swift response, and I completely understand the requirement to maintain compatibility with other plugins.
I do like the reasons given under the "why another tag plugin" section, the promise of a stable/maintained product is everything we hope for these days, in the future perhaps you guys will find a way to adopt the "modern, preferred way" without breaking compatibility elsewhere.
In the meantime keep up the good work!
...perhaps something similar to the hooks_mode
option mentioned here could be a feasible future implementation (unsure on the maintenance overhead).
Hi @chrislockwood this solution would only work (partly) with the approach to provide both solutions (alias and prepend) for the specific method, which should be overwritten. To provide a prepend AND a alias_method solution.
And, you (the user, which wants to install the plugin) has to create a configuration file for it. This makes the installation more difficult. There would be another problem: this is not a solution, if 3 plugins wants to overwrite a specific method. E.g. additional_tags, redmine_multiprojects_issue and redmine_contacts_helpdesk would not work with this solution. At the moment I have no idea how this problem could be fixed for Redmine plugins. I do not see it, that all developers will use the same approach, if there are more then one. Some developers (companies) are not willing to change the code for compatibility reasons. In the past we tried it some times and we got the another: "our plugin works, try it without the other plugins" :disappointed:
The change in column_content (the method, which both plugins tries to overwrite with different approaches) is required for tags. A solution would be to find a possibility without to use column_content.:
Another solution would be that Redmine provides a better solutions to customize for methods, which are popular for plugin developers (e.g. there are very often query helpers as column_value or column_content). I created a patch as proposal on redmine.org for that: https://www.redmine.org/issues/34743. With this patch, the problem would be solvable by plugin developers.
Hi @alexandermeindl
Appreciate your feedback on this, along with the patch submission, we can only hope that it is integrated in a timely fashion.
In the meantime perhaps another workaround can be found, though presumably only in the form of plugin developers working together. It would be good to have one tag plugin which has universal compatibility, because really this should be a core Redmine feature.
Hi @chrislockwood
sure, this would great. You can try do convince RedmineUp to use prepend instead of alias. This would be a great step, because RedmineUp plugins are used in many installations.
I am unclear on the exact issue, presumably something method overload related, also not sure which maintainer is best placed to investigate/workaround the problem.
https://github.com/nanego/redmine_multiprojects_issue/issues/48#issuecomment-778619978
In my case the multiproject_issue plugin solves a significant project architectural headache, but I would very much like to use tagging in conjunction, both offer superb functionality.