GEROMAX / redmine_subtask_list_accordion

This plugin provide accordion tree to subtask-list on issue.
https://www.redmine.org/plugins/redmine_subtask_list_accordion
GNU General Public License v3.0
12 stars 12 forks source link

500 error #9

Open archonwang opened 7 years ago

archonwang commented 7 years ago

@GEROMAX , open issue occur 500 error. please help to Check.

2017-09-14 13:28
An ActionView::Template::Error occurred in issues#show:

  undefined method `has_grandson_issues?' for #<#<Class:0x007f4f9411d600>:0x007f4f8c0f60d0>
  plugins/redmine_subtask_list_accordion/app/views/issues/_subtask_list_accordion_partial.html.erb:1:in `_b655f8085f0ba3e127370bc913d378e7'

-------------------------------
Backtrace:
-------------------------------

  plugins/redmine_subtask_list_accordion/app/views/issues/_subtask_list_accordion_partial.html.erb:1:in `_b655f8085f0ba3e127370bc913d378e7'
  lib/redmine/hook/view_listener.rb:59:in `block (2 levels) in render_on'
  lib/redmine/hook/view_listener.rb:57:in `map'
  lib/redmine/hook/view_listener.rb:57:in `block in render_on'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:96:in `call_hook'
  plugins/redmine_workflow_hidden_fields/app/views/issues/show.html.erb:142:in `_b96cb14498f1f784d11a8e1e1053dfcb'
  plugins/redmine_spent_time_in_issue_description/lib/issues_controller_patch.rb:36:in `block (2 levels) in show_with_plugin'
  plugins/redmine_spent_time_in_issue_description/lib/issues_controller_patch.rb:33:in `show_with_plugin'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
GEROMAX commented 7 years ago

Hi @archonwang .

I could not find problem it. Please tell me your Redmine version and plugin version.

archonwang commented 7 years ago

@GEROMAX ,

redmine 3.3.4 with newest master branch

GEROMAX commented 7 years ago

Hi @archonwang .

I tested on 3.3.4, but I could not find it problem. Please try "redmine:plugins:migrate" or use plugin ver 1.3.2.

archonwang commented 7 years ago

@GEROMAX , Ok I will check it later. Thanks.

sleewok commented 7 years ago

I have the same issue.

GEROMAX commented 7 years ago

Hi @sleewok .

I have some questions. Please tell me.

1.What version was it problem occur? 2.Dose it problem occur with old version? 3.Does the 'Issue' causing it problem have any characteristics?

Thanks.

sleewok commented 7 years ago

I have two separate machines with Redmine installed. Both get the same error with this plugin installed. Here is the info from my "Information" page on Redmine. I have removed this plugin for now.

MACHINE 1 Environment: Redmine version 3.4.2.stable Ruby version 2.3.4-p301 (2017-03-30) [x86_64-linux] Rails version 4.2.8 Environment production Database adapter Mysql2 SCM: Subversion 1.9.7 Cvs 1.12.13 Filesystem
Redmine plugins: clipboard_image_paste 1.12 redmine_agile 1.4.5 redmine_checklists 3.1.7 redmine_docson 0.1.2 redmine_impersonate 0.10.0 redmine_slack 0.2 redmineup_tags 2.0.0

MACHINE 2 Environment: Redmine version 3.4.2.stable.16970 Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux] Rails version 4.2.8 Environment production Database adapter PostgreSQL SCM: Subversion 1.9.3 Git 2.7.4 Filesystem
Xitolite 2.7.4 Redmine plugins: redmine_agile 1.4.5 redmine_bootstrap_kit 0.2.5 redmine_checklists 3.1.7 redmine_git_hosting 1.2.3 redmine_questions 0.0.7 redmine_subtask_list_accordion 1.3.3 redmineup_tags 2.0.0

1) 3.4.2 2) I am not sure. This version is the only version of redmine I have installed. 3) I am not sure what you are asking, can you please clarify?

leguminator commented 7 years ago

Hi, I confirm the Internal Error when trying to show an issue.

  1. Redmine is 3.4.2
  2. I tested the plugin about a month ago and it was doing fine on 3.4.2
  3. Any issue causes that error, even those without links / subtasks

Edit : previous version (downloaded in august) of the plugin works fine... maybe you missed something on the latest updates ?

sleewok commented 7 years ago

I get the error on issues with and without subtasks.

GEROMAX commented 7 years ago

Hi @sleewok and @leguminator .

I understood a little for problem it. I failure to cleanup 'Issues_Helper_Patch' maybe.

I try resolve this problem. But it will take a little time.

The plugin version 1.3.2, work for you maybe.

Thanks your bug report's.

GEROMAX commented 7 years ago

Hi everyone.

I try found this problem on these environment.

However, I could not find the problem in either environment. (In my expectation, it has occur on linux. but was different...)

Tentatively, I fix typo in 'init.rb' on 'bugfixFor1.3.4' branch. If you don't mind, please try that branch.

Thanks.

shenngw1127 commented 6 years ago

on redmine 3.3.5 and Redmine Subtask List Accordion 1.3.3. it may be the same issue on my server. my server is the official docker container https://hub.docker.com/_/redmine/

ActionView::Template::Error (undefined method has_grandson_issues?' for #<#<Class:0x007fbc9e195f98>:0x007fbc94cb9938>): 1: <% if has_grandson_issues?(@issue) %> 2: <%= content_for :header_tags do 3: stylesheet_link_tag("subtask_list_accordion", :plugin => "redmine_subtask_list_accordion") + 4: javascript_include_tag("subtask_list_accordion", :plugin => "redmine_subtask_list_accordion") plugins/redmine_subtask_list_accordion/app/views/issues/_subtask_list_accordion_partial.html.erb:1:in_plugins_redmine_subtask_list_accordion_app_views_issuessubtask_list_accordion_partial_html_erb__1830346830272776702_70224040726180' lib/redmine/hook/view_listener.rb:59:in block (2 levels) in render_on' lib/redmine/hook/view_listener.rb:57:inmap' lib/redmine/hook/view_listener.rb:57:in block in render_on' lib/redmine/hook.rb:61:inblock (2 levels) in call_hook' lib/redmine/hook.rb:61:in each' lib/redmine/hook.rb:61:inblock in call_hook' lib/redmine/hook.rb:58:in tap' lib/redmine/hook.rb:58:incall_hook' lib/redmine/hook.rb:96:in call_hook' app/views/issues/show.html.erb:92:in_app_views_issues_show_htmlerb185433534231352284_70223965240500' app/controllers/issues_controller.rb:122:in block (2 levels) in show' app/controllers/issues_controller.rb:119:inshow' lib/redmine/sudo_mode.rb:63:in `sudo_mode'

due to this issue, i can not view the bug on redmine. i had to remove the Redmine Subtask List Accordion 1.3.3

Environment: Redmine version 3.3.5.stable Ruby version 2.2.8-p477 (2017-09-14) [x86_64-linux] Rails version 4.2.7.1 Environment production Database adapter PostgreSQL SCM: Subversion 1.8.10 Mercurial 3.1.2 Bazaar 2.7.0 Git 2.1.4 Filesystem
Redmine plugins: clipboard_image_paste 1.12 redmine_checklists 3.1.10 redmine_issue_templates 0.1.8 redmine_lightbox2 0.3.5 redmine_xlsx_format_issue_exporter 0.1.5 scrum 0.18.0

More info: i have modified the issue status and the workflow in the redmine.

GEROMAX commented 6 years ago

Hi @shenngw1127 .

I cannot found this problem still. Because I try building a test environment now.

However, I commited small fix to "bugfixFor1.3.4" branch.

Can you try that branch?

Thanks.

GEROMAX commented 6 years ago

Hi everyone. @archonwang @sleewok @leguminator @shenngw1127

I tested under this environment on docker(for windows, official container). But was no problem, plugin works.

Environment:
  Redmine version                3.4.3.stable
  Ruby version                   2.4.2-p198 (2017-09-14) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.10
  Mercurial                      3.1.2
  Bazaar                         2.7.0
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  redmine_issue_badge            0.0.6
  redmine_subtask_list_accordion 1.3.3

I tried test a lot, but not found cause. You have any problem yet?

shenngw1127 commented 6 years ago

problem was not solved. my info:

Environment: Redmine version 3.3.5.stable Ruby version 2.2.8-p477 (2017-09-14) [x86_64-linux] Rails version 4.2.7.1 Environment production Database adapter PostgreSQL SCM: Subversion 1.8.10 Mercurial 3.1.2 Bazaar 2.7.0 Git 2.1.4 Filesystem Redmine plugins: clipboard_image_paste 1.12 redmine_checklists 3.1.10 redmine_issue_templates 0.1.8 redmine_lightbox2 0.3.5 redmine_xlsx_format_issue_exporter 0.1.5 scrum 0.18.0

2017-12-01 14:46 GMT+08:00 Ryuta Tobita notifications@github.com:

Hi everyone. @archonwang https://github.com/archonwang @sleewok https://github.com/sleewok @leguminator https://github.com/leguminator @shenngw1127 https://github.com/shenngw1127

I tested under this environment on docker(for windows, official container). But was no problem, plugin works.

Environment: Redmine version 3.4.3.stable Ruby version 2.4.2-p198 (2017-09-14) [x86_64-linux] Rails version 4.2.8 Environment production Database adapter Mysql2 SCM: Subversion 1.8.10 Mercurial 3.1.2 Bazaar 2.7.0 Git 2.1.4 Filesystem Redmine plugins: redmine_issue_badge 0.0.6 redmine_subtask_list_accordion 1.3.3

I tried test a lot, but not found cause. You have any problem yet?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GEROMAX/redmine_subtask_list_accordion/issues/9#issuecomment-348415490, or mute the thread https://github.com/notifications/unsubscribe-auth/AXnVyrjp0j97rPDpdaCBB5aGWkR3Xa-Yks5s76DjgaJpZM4PXE_j .

GEROMAX commented 6 years ago

@shenngw1127 .

Oh.. Hmm.. Did you run this command in docker container?

rake redmine:plugins:migrate

GEROMAX commented 6 years ago

Hi everyone. @archonwang @sleewok @leguminator @shenngw1127

After all, I could not find this problem. orz. But I released new version today.

It version with some better code. And this problem may be fix.

If you are interested, try new version. Thanks.

archonwang commented 6 years ago

@GEROMAX , Thanks

I will test it later on my Redmine 3.3.X.

Ying666 commented 6 years ago

I got the same issue with Redmine 3.4.2 and tried to delete all other plugins which are same to archonwangs redmine installation, without success. The thing is, a completly fresh installation of redmine (same versions of redmine, ruby etc. / server ) without any other plugins does not have the issue. So maybe there is a incompatibility with another plugin? I will try to remove the plugins one after another, so maybe I can provide further information which one is causing the issue.

Log:

Started GET "/issues/12631" for 80.156.16.178 at 2018-02-14 13:19:47 +0100 Processing by IssuesController#show as HTML Parameters: {"id"=>"12631"} Current user: mm (id=3) Rendered issues/_action_menu.html.erb (4.0ms) Rendered plugins/redmine_contacts/app/views/deals_issues/_show.html.erb (1.1ms) Rendered plugins/redmine_contacts_helpdesk/app/views/issues/_ticket_data.html.erb (0.5ms) Rendered plugins/redmine_products/app/views/products_issues/_products.html.erb (2.5ms) Rendered plugins/redmine_hourglass/app/views/hooks/time_tracker/_start_link.slim (0.4ms) Rendered plugins/redmine_hourglass/app/views/hooks/_issue_actions.slim (4.5ms) Rendered plugins/redmine_subtask_list_accordion/app/views/issues/_subtask_list_accordion_partial.html.erb (205.7ms) Rendered issues/show.html.erb within layouts/base (256.6ms) Completed 500 Internal Server Error in 342ms (ActiveRecord: 9.6ms)

ActionView::Template::Error (undefined method has_grandson_issues?' for #<#<Class:0x000000032b9118>:0x000000043fc948>): 1: <% if has_grandson_issues?(@issue) %> 2: <%= content_for :header_tags do 3: stylesheet_link_tag("subtask_list_accordion" + (subtask_list_accordion_tree_render_32? ? "_under32" : ""), :plugin => "redmine_subtask_list_accordion") + 4: javascript_include_tag("subtask_list_accordion" + (subtask_tree_client_processing? ? "_client" : ""), :plugin => "redmine_subtask_list_accordion") plugins/redmine_subtask_list_accordion/app/views/issues/_subtask_list_accordion_partial.html.erb:1:in_plugins_redmine_subtask_list_accordion_app_views_issuessubtask_list_accordion_partial_htmlerb2089499510649542330_24444480' lib/redmine/hook/view_listener.rb:59:in block (2 levels) in render_on' lib/redmine/hook/view_listener.rb:57:inmap' lib/redmine/hook/view_listener.rb:57:in block in render_on' lib/redmine/hook.rb:61:inblock (2 levels) in call_hook' lib/redmine/hook.rb:61:in each' lib/redmine/hook.rb:61:inblock in call_hook' lib/redmine/hook.rb:58:in tap' lib/redmine/hook.rb:58:incall_hook' lib/redmine/hook.rb:96:in call_hook' app/views/issues/show.html.erb:113:in_app_views_issues_show_html_erb___1097978873125853863_26242140' app/controllers/issues_controller.rb:106:in block (2 levels) in show' app/controllers/issues_controller.rb:99:inshow' lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Environment:

Redmine version 3.4.2.stable.16831 Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux-gnu] Rails version 4.2.8 Environment production Database adapter Mysql2 SCM: Subversion 1.9.3 Git 2.7.4 Filesystem
Redmine plugins: liste 1.0.0 polls 0.0.1 redmine__select2 1.1.0 redmine_auto_percent 0.0.2 redmine_banner 0.1.2 redmine_contacts 4.1.1 redmine_contacts_helpdesk 3.0.8 redmine_contacts_invoices 4.1.6 redmine_crm_mailchimp 1.0.2 redmine_editauthor 0.11.0 redmine_favorite_projects 2.0.3 redmine_finance 2.1.3 redmine_group_macro 0.1.0 redmine_hourglass 1.0.0 redmine_lightbox2 0.3.2 redmine_local_avatars 0.2.0 redmine_people 1.3.1 redmine_private_wiki 0.2.0 redmine_products 2.0.4 redmine_questions 0.0.7 redmine_recenthistory 0.0.2 redmine_silencer 0.4.1-burg redmine_subtask_list_accordion 2.1.0 redmine_wiki_extensions 0.8.0 redmine_wiki_lists 0.0.9 sidebar_hide 0.0.8 test_plugin 0.0.1 wiking 1.0.0b

GEROMAX commented 6 years ago

Hi @Ying666 .

Thank you for detail report.

Do you also think so? I was think so a little.

I will try combination test with other plugin. When if you understand something, Please tell me.

I appreciate your cooperation.

GEROMAX commented 6 years ago

Hi @Ying666 .

For now, I tested those combination. But not found 500 error... Some plugins could not be test because it was a paid product or could not be found.

Have you found anything?

Environment:

Redmine version 3.4.2.stable Ruby version 2.4.2-p198 (2017-09-14) [x86_64-linux] Rails version 4.2.8 Environment production Database adapter Mysql2 SCM: Subversion 1.8.10 Mercurial 3.1.2 Bazaar 2.7.0 Git 2.1.4 Filesystem
Redmine plugins: redmine__select2 1.1.0 redmine_auto_percent 0.0.2 redmine_banner 0.1.2 redmine_contacts 4.1.1 redmine_contacts_invoices 4.1.6 redmine_editauthor 0.11.0 redmine_favorite_projects 2.0.3 redmine_finance 2.1.3 redmine_group_macro 0.1.0 redmine_hourglass 1.0.0 redmine_lightbox2 0.3.2 redmine_people 1.3.2 redmine_private_wiki 0.2.0 redmine_products 2.0.4 redmine_questions 0.0.7 redmine_recenthistory 0.0.2 redmine_silencer 0.4.2 redmine_subtask_list_accordion 2.1.0 redmine_wiki_extensions 0.8.0 redmine_wiki_lists 0.0.9 sidebar_hide 0.0.8 wiking 1.0.0b

Ying666 commented 6 years ago

No, because I can not uninstall all of the redmineup plugins, because this causes further errors. But the plugins of redmineup are the only ones left, so it could be one of them: Redmine plugins: redmine_contacts 4.1.1 redmine_contacts_invoices 4.1.6 redmine_finance 2.1.3 redmine_subtask_list_accordion 2.1.0

The error with "has_grandson_issues" says it cant find the method, the method is defined in the file issues_helper_patch.rb. Just a guess but this file also exist in the redmine_contacts plugin, could this cause the problem? find . -iname issues_helper_patch.rb

./redmine_contacts/lib/redmine_contacts/patches/issues_helper_patch.rb ./redmine_subtask_list_accordion/lib/redmine_subtask_list_accordion/patches/issues_helper_patch.rb We use the Pro Version of the redmine_contacts plugin (Redmine CRM plugin (PRO version))

Whats speak against it, is that the normal version (which you tested) worked fine for you. Maybe there are some very old things remaining, which causes the trouble, our redmine started at version 2.1.x

Jiangshan00001 commented 6 years ago

i don't know why. but i found one way to make the code work: do alias_method for the method that has undefined error. issues_helper_patch.rb alias_method :old name, :new name

Jiangshan00001 commented 6 years ago

image this works for me

    alias_method :has_grandson_issues?, :has_grandson_issues?
    alias_method :subtask_list_accordion_tree_render_32?, :subtask_list_accordion_tree_render_32?
    alias_method :subtask_tree_client_processing?, :subtask_tree_client_processing?
    alias_method :expand_tree_at_first?, :expand_tree_at_first?
    alias_method :render_descendants_tree_accordion, :render_descendants_tree_accordion
    alias_method :subtask_list_accordion_tree_render_33?, :subtask_list_accordion_tree_render_33?
GEROMAX commented 6 years ago

Hi @Jiangshan00001 . Thank you for your detail reporting.

This problem is probably due to conflicting method name "has_granson_issues?" by something program.

I trying change method name. Please give me some time.

Thanks.

GEROMAX commented 6 years ago

Hi @Jiangshan00001 and everyone.

I renamed method 'has_grandson_issues?' on development branch. Can you try this branch?

git checkout -b development origin/development

jasonmacer commented 5 years ago

Has there been any update to this? I just installed fresh 4.X and got this 500 error too.

Did the master branch never get update?

Thank you!

jasonmacer commented 5 years ago

As an update, I have attempted to use the development branch, and the bugfixFor1.3.4, bugt I am still getting this error. Here is my environment:

Environment: Redmine version 4.0.4.stable Ruby version 2.6.3-p62 (2019-04-16) [x86_64-linux] Rails version 5.2.3 Environment production Database adapter PostgreSQL Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Git 1.8.3.1 Filesystem
Redmine plugins: easy_instant_messages 2016 easy_mindmup 1.0 easy_wbs 1.5 redhopper 2.0.0 redmine_agile 1.4.12 redmine_base_deface 1.3.2 redmine_base_stimulusjs 1.0.1 redmine_checklists 3.1.16 redmine_ckeditor 1.2.2 redmine_home_page_redirector 1.0.0 redmine_issue_badge 0.1.0 redmine_issue_dynamic_edit 0.6.7 redmine_issue_templates 0.3.5 redmine_issue_todo_lists 1.3 redmine_issue_view_columns 1.0.1 redmine_issues_hub 0.0.2 redmine_issues_tree 0.0.13 redmine_mapping_board 0.7.0 redmine_messenger 1.0.5 redmine_multiprojects_issue 4.0.0 redmine_percent_done 1.1.0 redmine_project_alias_2 1.1.1 redmine_smile_togglesidebar 1.0.6 redmine_subtask_list_accordion 2.2.0

jasonmacer commented 5 years ago

I renamed method 'has_grandson_issues?' on development branch. Can you try this branch?

git checkout -b development origin/development

I did attempt this, however the issue is still there.

jasonmacer commented 5 years ago

I'm just checking in to see if anyone has any potential updates.

MagistrYoda commented 4 years ago

believe it's related to redmine_multiprojects_issue plugin. issue gone when i removed it from bundle.

bsecker commented 4 years ago

Have added a PR that might be of help to some, @jasonmacer @MagistrYoda see https://github.com/GEROMAX/redmine_subtask_list_accordion/pull/14