Closed dailson-igo closed 2 years ago
Hi @dailson-igo,
thanks for reporting this! I fixed this problem with my last commit. Now it checks if a custom controller uses issue sidebar. Tags are not displayed in sidebar with this controllers.
Let me know, if this solved your problem.
Thanks a lot for the feedback. Still with erro
DEBUG -- : [f1912abe-65d0-4053-a78c-efb2acaf1e40] Rendered plugins/redmine_issue_templates/app/views/issue_templates/_issue_template_link.html.erb (Duration: 1.1ms | Allocations: 927)
DEBUG -- : [f1912abe-65d0-4053-a78c-efb2acaf1e40] Rendered plugins/additional_tags/app/views/issues/_tags_sidebar.html.slim (Duration: 20.2ms | Allocations: 10374)
DEBUG -- : [f1912abe-65d0-4053-a78c-efb2acaf1e40] Rendered issues/_sidebar.html.erb (Duration: 30.9ms | Allocations: 26189)
INFO -- : [f1912abe-65d0-4053-a78c-efb2acaf1e40] Rendered plugins/redmine_issues_panel/app/views/issues_panel/index.html.erb within layouts/base (Duration: 173.1ms | Allocations: 135120)
INFO -- : [f1912abe-65d0-4053-a78c-efb2acaf1e40] Rendered layout layouts/base.html.erb (Duration: 173.3ms | Allocations: 135178)
INFO -- : [f1912abe-65d0-4053-a78c-efb2acaf1e40] Completed 500 Internal Server Error in 316ms (ActiveRecord: 53.2ms | Allocations: 218821)
FATAL -- : [f1912abe-65d0-4053-a78c-efb2acaf1e40]
ActionView::Template::Error (undefined local variable or method `sidebar_tags' for #
plugins/additional_tags/app/views/issues/_tags_sidebar.html.slim:2
lib/redmine/hook/view_listener.rb:61:in block (2 levels) in render_on' lib/redmine/hook/view_listener.rb:59:in
map'
lib/redmine/hook/view_listener.rb:59:in block in render_on' lib/redmine/hook.rb:66:in
block (2 levels) in call_hook'
lib/redmine/hook.rb:66:in each' lib/redmine/hook.rb:66:in
block in call_hook'
lib/redmine/hook.rb:63:in call_hook' lib/redmine/hook.rb:101:in
call_hook'
app/views/issues/_sidebar.html.erb:2
plugins/redmine_issues_panel/app/views/issues_panel/index.html.erb:31
plugins/redmine_issues_panel/app/views/issues_panel/index.html.erb:30
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
Did you used latest main branch with your last test?
Sorry, I had tested with "-b stable". From the main tree everything went fine. Thanks.
It stopped working in my environment after adding the Redmine Issues Panel plugin, and creating a Tag for a task. Redmine 5, Ruby 3.1, Rails 6.1 https://github.com/redmica/redmine_issues_panel
INFO -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Started GET "/projects/projeto-scrum-1/issues_panel" for 192.168.233.1 INFO -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Processing by IssuesPanelController#index as HTML INFO -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Parameters: {"project_id"=>"projeto-scrum-1"} (...) DEBUG -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Rendered plugins/additionals/app/views/issues/_additionals_sidebar_issues.html.slim (Duration: 0.1ms | Allocations: 42) DEBUG -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Rendered plugins/redmine_issue_templates/app/views/issue_templates/_issue_template_link.html.erb (Duration: 0.8ms | Allocations: 539) DEBUG -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Rendered plugins/additional_tags/app/views/issues/_tags_sidebar.html.slim (Duration: 32.9ms | Allocations: 38450) DEBUG -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Rendered issues/_sidebar.html.erb (Duration: 34.3ms | Allocations: 39377) INFO -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Rendered plugins/redmine_issues_panel/app/views/issues_panel/index.html.erb within layouts/base (Duration: 135.6ms | Allocations: 94041) INFO -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Rendered layout layouts/base.html.erb (Duration: 135.7ms | Allocations: 94095) INFO -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] Completed 500 Internal Server Error in 157ms (ActiveRecord: 10.1ms | Allocations: 100683) FATAL -- : [d32e1396-b50f-418e-90c4-96e5f073e2d5] [d32e1396-b50f-418e-90c4-96e5f073e2d5] ActionView::Template::Error (undefined local variable or method `sidebar_tags' for #ActionView::Base:0x00000000010694 Did you mean? sidebar_queries): 1: - if AdditionalTags.setting?(:active_issue_tags) && 2: User.current.allowed_to?(:view_issue_tags, @project, global: true) && sidebar_tags.present? 3: .sidebar-tags 4: h3 = l :field_tags 5: = render_sidebar_tags
plugins/additional_tags/app/views/issues/_tags_sidebar.html.slim:2 lib/redmine/hook/view_listener.rb:61:in block (2 levels) in render_on' lib/redmine/hook/view_listener.rb:59:in map' lib/redmine/hook/view_listener.rb:59:in block in render_on' lib/redmine/hook.rb:66:in block (2 levels) in call_hook' lib/redmine/hook.rb:66:in each' lib/redmine/hook.rb:66:in block in call_hook' lib/redmine/hook.rb:63:in call_hook' lib/redmine/hook.rb:101:in call_hook' app/views/issues/_sidebar.html.erb:2 plugins/redmine_issues_panel/app/views/issues_panel/index.html.erb:31 plugins/redmine_issues_panel/app/views/issues_panel/index.html.erb:30 lib/redmine/sudo_mode.rb:61:in `sudo_mode'