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

Issue delete error #134

Open btmndkh opened 1 year ago

btmndkh commented 1 year ago

I got following error, when I try to delete an issue.

I, [2023-04-12T16:09:31.657615 #307]  INFO -- : [32d1a8de-cf45-4fe7-a398-09c1544e2fa4] Started GET "/issues/487" for ***HOST IP*** at 2023-04-12 16:09:31 +0900
I, [2023-04-12T16:09:31.657615 #305]  INFO -- : [bda3490c-7d0c-4500-9fa9-a4d5b7d06154] Started DELETE "/issues/487" for ***HOST IP*** at 2023-04-12 16:09:31 +0900
I, [2023-04-12T16:09:31.658660 #305]  INFO -- : [bda3490c-7d0c-4500-9fa9-a4d5b7d06154] Processing by IssuesController#destroy as HTML
I, [2023-04-12T16:09:31.658652 #307]  INFO -- : [32d1a8de-cf45-4fe7-a398-09c1544e2fa4] Processing by IssuesController#show as */*
I, [2023-04-12T16:09:31.658722 #307]  INFO -- : [32d1a8de-cf45-4fe7-a398-09c1544e2fa4]   Parameters: {"id"=>"487"}
I, [2023-04-12T16:09:31.658725 #305]  INFO -- : [bda3490c-7d0c-4500-9fa9-a4d5b7d06154]   Parameters: {"authenticity_token"=>"dHetyxxxxx", "id"=>"x"}
I, [2023-04-12T16:09:31.666505 #305]  INFO -- : [bda3490c-7d0c-4500-9fa9-a4d5b7d06154]   Current user: test@test.com (id=6)
I, [2023-04-12T16:09:31.666505 #307]  INFO -- : [32d1a8de-cf45-4fe7-a398-09c1544e2fa4]   Current user: test@test.com (id=6)
I, [2023-04-12T16:09:31.744225 #305]  INFO -- : [bda3490c-7d0c-4500-9fa9-a4d5b7d06154] Redirected to http://testredmine.com/projects/***PROJECT ID***/issues
I, [2023-04-12T16:09:31.747379 #305]  INFO -- : [bda3490c-7d0c-4500-9fa9-a4d5b7d06154] Completed 302 Found in 89ms (ActiveRecord: 31.8ms | Allocations: 11005)
I, [2023-04-12T16:09:31.760905 #305]  INFO -- : [99d359cc-fdcf-444f-9f1b-ecd6cb18aea1] Started GET "/projects/***PROJECT ID***/issues" for ***HOST IP*** at 2023-04-12 16:09:31 +0900
I, [2023-04-12T16:09:31.762056 #305]  INFO -- : [99d359cc-fdcf-444f-9f1b-ecd6cb18aea1] Processing by IssuesController#index as HTML
I, [2023-04-12T16:09:31.762138 #305]  INFO -- : [99d359cc-fdcf-444f-9f1b-ecd6cb18aea1]   Parameters: {"project_id"=>"***PROJECT ID***"}
I, [2023-04-12T16:09:31.768412 #305]  INFO -- : [99d359cc-fdcf-444f-9f1b-ecd6cb18aea1]   Current user: test@test.com (id=6)
I, [2023-04-12T16:09:31.778258 #305]  INFO -- : [99d359cc-fdcf-444f-9f1b-ecd6cb18aea1] Completed 500 Internal Server Error in 16ms (ActiveRecord: 3.0ms | Allocations: 2544)
F, [2023-04-12T16:09:31.779153 #305] FATAL -- : [99d359cc-fdcf-444f-9f1b-ecd6cb18aea1]
[99d359cc-fdcf-444f-9f1b-ecd6cb18aea1] ArgumentError (bad argument (expected URI object or URI string)):
[99d359cc-fdcf-444f-9f1b-ecd6cb18aea1]
[99d359cc-fdcf-444f-9f1b-ecd6cb18aea1] plugins/redmine_issues_tree/lib/redmine_issues_tree/issues_controller_patch.rb:12:in `index'
[99d359cc-fdcf-444f-9f1b-ecd6cb18aea1] lib/redmine/sudo_mode.rb:61:in `sudo_mode'
I, [2023-04-12T16:09:31.883095 #307]  INFO -- : [32d1a8de-cf45-4fe7-a398-09c1544e2fa4]   Rendered issues/show.html.erb within layouts/base (Duration: 134.2ms | Allocations: 47974)
I, [2023-04-12T16:09:31.922093 #307]  INFO -- : [32d1a8de-cf45-4fe7-a398-09c1544e2fa4]   Rendered layout layouts/base.html.erb (Duration: 173.3ms | Allocations: 67720)
I, [2023-04-12T16:09:31.922557 #307]  INFO -- : [32d1a8de-cf45-4fe7-a398-09c1544e2fa4] Completed 200 OK in 264ms (Views: 145.7ms | ActiveRecord: 56.5ms | Allocations: 80485)

Here is my version details

Details

Environment: Redmine version 5.0.5.stable Ruby version 2.7.5-p203 (2021-11-24) [x86_64-linux-gnu] Rails version 6.1.7.2 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp Redmine settings: Redmine theme Abacusmine_2.0.8 (includes JavaScript) SCM: Subversion 1.13.0 Mercurial 5.3.1 Cvs 1.12.13 Bazaar 3.0.2 Git 2.39.2 Filesystem Redmine plugins: redmine_add_absolute_time 0.0.1 redmine_agile 1.6.5 redmine_banner 0.3.4 redmine_checklists 3.1.22 redmine_ckeditor 1.2.4 redmine_dmsf 3.0.12 redmine_issue_dynamic_edit 0.8.1 redmine_issue_templates 1.1.1 redmine_issues_tree 0.0.15 redmine_questions 1.0.4 redmine_x_lightbox2 1.0.0

btmndkh commented 1 year ago

I believe the error occurs due to the redirect. If the redirect leads to http://testredmine.com/projects/***PROJECT ID***/ instead of http://testredmine.com/projects/***PROJECT ID***/issues, it may work.

Any advice on how to fix the issue?

btmndkh commented 1 year ago

just find out that redirection should be to /issues_trees/tree_index. But still error occurs in this version...

btmndkh commented 1 year ago

If the request is made using HTTP, it works just fine. However, if the request is made using HTTPS, an error occurs. Is the error caused by Redmine 5.0.5 or the tree plugin? This is because Redmine 4.0.5 with tree 0.0.14 works just fine, regardless of whether HTTP or HTTPS is used.

btmndkh commented 1 year ago

An error occurs after migration, but when it's a fresh install, there are no errors at all.

The Redmine version was upgraded:

Loriowar commented 1 year ago

So, most probably the problem is in your installation. I can't find a relation between the plugin and SSL. Moreover, I've checked Redmine 5.0.5 with tree plugin 0.0.15 from 5.0.x branch and all works fine in case of HTTPS.

btmndkh commented 1 year ago

Thanks for confirmation. Let me try again in few days. I'll update here once test complete :)