Loriowar / redmine_issues_tree

Provides a tree view of the Redmine issues list
GNU General Public License v3.0
115 stars 72 forks source link

redmine 3.2: single issue view results internal error after installing the plugin #28

Closed heidricha closed 8 years ago

heidricha commented 8 years ago

just installed the plugin along with the dependants:

drwxr-xr-x 1 icsadmin icsadmin 100 Apr 29 14:46 a_common_libs drwxr-xr-x 1 icsadmin icsadmin 122 Apr 29 14:46 global_roles drwxrwxr-x 1 icsadmin icsadmin 98 Apr 29 17:20 redmine_issues_tree

the plugins seem to be installed the 'tree view'/'plain view' switch is visible, plugin displays issue tree.

the problem is, that after installing the plugin, the single issue view (f.e. https://server/issues/21) gives internal error. If I remove the plugin, the view works as earlier.

Loriowar commented 8 years ago

Which version (branch) of plugin you use? May you provide a backtrace of error from log? Information about other installed plugins can help too. In other words: please, provide me enough information about you problem and about way to repeat it, otherwise I'll can't help you. On clean Redmine with corresponding version of plugin all works fine.

heidricha commented 8 years ago

3.2 branch is installed. All the plugins are the three you can see above. I will provide you detailed logs soon, thanks for the attention!

heidricha commented 8 years ago

tail of the log (after several SQL statements):

Rendered issues/_action_menu.html.erb (17.5ms) Rendered issues/show.html.erb within layouts/base (18.1ms) Completed 500 Internal Server Error in 109ms (ActiveRecord: 10.0ms)

ActionView::Template::Error (undefined method favourite_project_id' for #<UserPreference:0x007ff7e6442c18>): 2: <%= link_to l(:button_edit), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %> 3: <%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %> 4: <%= watcher_link(@issue, User.current) %> 5: <%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %> 6: <%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %> 7: </div> plugins/a_common_libs/lib/a_common_libs/user_patch.rb:9:infavourite_project' plugins/a_common_libs/lib/a_common_libs/issue_patch.rb:16:in allowed_target_projects_with_acl' app/views/issues/_action_menu.html.erb:5:in_app_views_issuesaction_menu_htmlerb3692252428831406934_70351341613960' app/views/issues/show.html.erb:1:in _app_views_issues_show_html_erb___2974627738541497569_70351340168120' app/controllers/issues_controller.rb:118:inblock (2 levels) in show' app/controllers/issues_controller.rb:115:in show' lib/redmine/sudo_mode.rb:63:insudo_mode'

Without the plugins, it works normally.

heidricha commented 8 years ago

strange news

if I also install redmine_aglle_light plugin, and the issue view works again.

Loriowar commented 8 years ago

Based on the log info, there is some strange patch in plugins/a_common_libs/lib/a_common_libs/user_patch.rb:9. Most likely, plugin a_common_libs change default issues behaviour. I can't imagine all possible changes in issues functionality. So, I assume, that plugin must correctly work only with default Redmine methods and functionality. If someone broke backward compatibility with Redmine, this is them choice. For now I only can add information about incompatibility of this plugin in Redmine page of my plugin. In future I'll try to look on patches and think about solution, but this is not a priority task.

What about redmine_aglle_light. Most likely, this plugin loaded after a_common_libs and redefine part of issues functions again. But redefine them with saving of backward compatibility. So, there is a high probability, than with redmine_aglle_light you lost some functionality provided with a_common_libs.

This situation is "normal" for Redmine. If you want to use lots of plugins, which influence on same functionality, you must resolve conflicts by yourself. Or write a new plugin for integration two or more plugins with fixing of patches problem.

Good luck on this difficult way.

heidricha commented 8 years ago

Thanks a lot. It is more clear now for me. I mixed the dependency of the module anyway, basically I have installed a_common_libs because I thought it was necessary for issues_tree. Uninstalling a_common_libs saved the day, the module (issues_tree) works fine even along agile_light.