redmine_knowledgebase icon indicating copy to clipboard operation
redmine_knowledgebase copied to clipboard

Error 500 when uploading PDF or image files

Open tiurlumbangaol opened this issue 4 years ago • 0 comments

Error 500 when uploading PDF or image files.

the production log saying : ActionView::Template::Error (undefined method thumbnail_path'`

This issue only there when we upload PDF or images files.

the solution step 1 edit this file : plugins/redmine_knowledgebase/app/helpers/knowledgebase_helper.rb

change : return "#{Setting.protocol}://#{Setting.host_name}#{thumbnail_path(thumb)}"

to : return polymorphic_url(thumb, :host => Setting.host_name, :protocol => Setting.protocol)

solution step 2 : rename file from : app\views\attachments_links.html.erb to app\views\attachments_links.html.erb.bak or you could simply delete the file

and the error is gone. the solution is from : https://github.com/wiesion/redmine_knowledgebase

is it a proper fix?

tiurlumbangaol avatar Sep 15 '20 07:09 tiurlumbangaol