onlyoffice-redmine icon indicating copy to clipboard operation
onlyoffice-redmine copied to clipboard

Internal Error 500 while opening issue with attached file(s)

Open viser72 opened this issue 2 years ago • 2 comments

Hi, I met a misbehaviour of onlyoffice-redmine plugin while opening an issue with attached file(s). As I understand it can't manipulate with file extension in code (production.log):

`I, [2022-08-24T12:50:58.420840 #1] INFO -- : Rendered issues/show.html.erb (Duration: 341.5ms | Allocations: 127861) I, [2022-08-24T12:50:58.426989 #1] INFO -- : Rendered plugins/onlyoffice_redmine/app/views/issues/show.html.erb within layouts/base (Duration: 347.9ms | Allocations: 129983) I, [2022-08-24T12:50:58.427191 #1] INFO -- : Rendered layout layouts/base.html.erb (Duration: 348.1ms | Allocations: 130011) I, [2022-08-24T12:50:58.427711 #1] INFO -- : Completed 500 Internal Server Error in 418ms (ActiveRecord: 71.2ms | Allocations: 144875) F, [2022-08-24T12:50:58.429942 #1] FATAL -- : ActionView::Template::Error (undefined method + for nil:NilClass): 42: @issue.attachments.each do |attachment| 43: is_editable_array = is_editable_array + [DocumentHelper.is_editable(attachment)] 44: attachments_disk_filenames = attachments_disk_filenames + [attachment.disk_filename] 45: ext = attachment.disk_filename[attachment.disk_filename.index(".")+1..] 46: is_convert = is_convert + [FormatUtility.format_supported(ext).length != 0] 47: end 48: %>

plugins/onlyoffice_redmine/app/views/issues/show.html.erb:45 plugins/onlyoffice_redmine/app/views/issues/show.html.erb:42 app/controllers/issues_controller.rb:118:in block (2 levels) in show app/controllers/issues_controller.rb:110:in show lib/redmine/sudo_mode.rb:61:in sudo_mode_`

Could someone point me how to fix problem?

viser72 avatar Aug 24 '22 07:08 viser72

This github version has errors and compatibility issue. I make a modified working version, but I do not know how to use github to request a pull. So I put the fixed version here https://drive.google.com/drive/folders/18RUVPV9LhsXmqTQ5BQqcxQGhkdJ5EYlG?usp=sharing Hope it helps Regards,

quanltt avatar Dec 03 '22 05:12 quanltt

Please check if the issue persists with the recently released version 3.0 of the plugin.

SergeyKorneyev avatar Jan 30 '24 13:01 SergeyKorneyev