HugoHasenbein / redmine_more_previews

Redmine plugin to preview various file types in redmine's preview pane
https://www.redmine.org/plugins/redmine_more_previews
GNU General Public License v2.0
46 stars 15 forks source link

Plugin not working #51

Open phuongnl15395 opened 2 years ago

phuongnl15395 commented 2 years ago

after installing plugin I'm not seeing any change, still can't preview the file (Libre is installed on server). I'm using Redmine 4.0.0.stable, centos 7, LibreOffice 7.3.2.2.

HugoHasenbein commented 2 years ago

Have you configured the plugin in Administration->Plugins->Redmine More Preview?

Am 20.04.2022 um 09:09 schrieb phuongnl15395 @.***>:

after installing plugin I'm not seeing any change, still can't preview the file (Libre is installed on server). I'm using Redmine 4.0.0.stable, centos 7, LibreOffice 7.3.2.2.

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRA6RY5DD2YO35LDFZDVF6UTXANCNFSM5T3BPEJA. You are receiving this because you are subscribed to this thread.

phuongnl15395 commented 2 years ago

yes, i'm already config it but when i try file with *.docx nothing happend, seem like the plugin not working

phuongnl15395 commented 2 years ago

@HugoHasenbein could you help me with this? I already using latest version of your git

HugoHasenbein commented 2 years ago

whats wrong?

Am 04.05.2022 um 05:12 schrieb phuongnl15395 @.***>:

@HugoHasenbein https://github.com/HugoHasenbein could you help me with this?

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116886753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDREX2DMTJ4ROPFC75U3VIHTLVANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

Like I mention above, seems like the plugin not working, can you help me with debuging?

HugoHasenbein commented 2 years ago

yes, please share what you are seeing (or not seeing) with this plugin.

Am 04.05.2022 um 05:53 schrieb phuongnl15395 @.***>:

Like I mention above, seems like the plugin not working, can you help me with debuging?

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116901742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRDY3LJE2KITUZ7T6U3VIHYDZANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago
HugoHasenbein commented 2 years ago

use email: @.***

Am 04.05.2022 um 05:57 schrieb phuongnl15395 @.***>:

Are there any other channel I can chat direct with you? — Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116903367, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRBOFXYSBPFEFQJP6U3VIHYT5ANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

I'm not able to see it, sorry I'm kinda new to this

HugoHasenbein commented 2 years ago

did you copy the plugin in the plugins folder and did you call 'bundle install' ? then in redmine go to Administration->Plugins->Redmine More Previews and activate those file types you want to preview

Am 04.05.2022 um 06:02 schrieb phuongnl15395 @.***>:

I'm not able to see it, sorry I'm kinda new to this

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116905296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGBMIGPECAVGNPP53DVIHZGVANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

Yes, I'm already done all that step, I can see it in Administration -> plugin -> active Libre. But the problem after done those step, I upload file but I can preview it

HugoHasenbein commented 2 years ago

and you activated the corresponding file type f.i. docx for Microsoft Word files? Further, in the plugin configuration there is a green hook mark behind LibreOffice available?

Am 04.05.2022 um 06:17 schrieb phuongnl15395 @.***>:

Yes, I'm already done all that step, I can see it in Administration -> plugin -> active Libre. But the problem after done those step, I upload file but I can preview it

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116911812, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRDPY4CFFACZ2A2NIDDVIH25JANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago
HugoHasenbein commented 2 years ago

turn on debug, you should see something likes the attached image. Which version of redmine are you using? 4.2.5? 5.0.0?

Am 04.05.2022 um 07:15 schrieb phuongnl15395 @.***>:

and you activated the corresponding file type f.i. docx for Microsoft Word file <- Yes green hook mark behind LibreOffice available? <- Yes Is there anything else that I should check? — Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116936863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRE4MG7DHHQPDAJKMFTVIIBYPANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

Currently, I'm using Redmine version 4.0.0 "turn on debug, you should see something likes the attached image.",

I already turn on debug, but I dont see anything

HugoHasenbein commented 2 years ago

can you send a log file output?

The logfile is located at /log/production.log (if you are in production mode)

On a Linux console type

tail -f log/production.log

Then send me the output, which is created, when you click on a file to be previewed.

Am 04.05.2022 um 07:31 schrieb phuongnl15395 @.***>:

Currently, I'm using Redmine version 4.0.0 "turn on debug, you should see something likes the attached image.",

I already turn on debug, but I dont see anything

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116942482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGNN3EZO3EZHXSSUC3VIIDRXANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

I give you the log output Started GET "/attachments/1856" for 103.245.252.76 at 2022-05-04 12:39:18 +0700 Processing by AttachmentsController#show as HTML Parameters: {"id"=>"1856"} Current user: phuongnl4 (id=30) Rendering attachments/other.html.erb within layouts/base Rendered common/_no_preview.html.erb (0.3ms) Rendered common/_other.html.erb (0.9ms) Rendered layouts/_file.html.erb (12.2ms) Rendered attachments/other.html.erb within layouts/base (12.9ms) Rendered plugins/redmine_more_filters/app/views/hooks/redmine_more_filters/_toggle_operator.html.erb (0.2ms) Rendered plugins/redmine_more_filters/app/views/hooks/redmine_more_filters/_css.html.erb (0.3ms) Rendered plugins/redmineup_tags/app/views/tags/_additional_assets.html.erb (0.6ms) Rendered plugins/additionals/app/views/additionals/_html_head.html.slim (0.6ms) Rendered plugins/additionals/app/views/additionals/_body_top.slim (0.2ms) Rendered plugins/additionals/app/views/additionals/_content.html.slim (0.2ms) Rendered plugins/redmineup_tags/app/views/tags/_select2_transformation_rules.html.erb (0.3ms) Rendered plugins/additionals/app/views/additionals/_body_bottom.html.slim (0.3ms) Completed 200 OK in 59ms (Views: 44.0ms | ActiveRecord: 5.0ms)

HugoHasenbein commented 2 years ago

I can see no error. When on the preview page" click on "reload" and see if the log file outputs different information. Else, send the a screen shot of the following pages:

Am 04.05.2022 um 07:40 schrieb phuongnl15395 @.***>:

I give you the log output Started GET "/attachments/1856" for 103.245.252.76 at 2022-05-04 12:39:18 +0700 Processing by AttachmentsController#show as HTML Parameters: {"id"=>"1856"} Current user: phuongnl4 (id=30) Rendering attachments/other.html.erb within layouts/base Rendered common/_no_preview.html.erb (0.3ms) Rendered common/_other.html.erb (0.9ms) Rendered layouts/_file.html.erb (12.2ms) Rendered attachments/other.html.erb within layouts/base (12.9ms) Rendered plugins/redmine_more_filters/app/views/hooks/redmine_more_filters/_toggle_operator.html.erb (0.2ms) Rendered plugins/redmine_more_filters/app/views/hooks/redmine_more_filters/_css.html.erb (0.3ms) Rendered plugins/redmineup_tags/app/views/tags/_additional_assets.html.erb (0.6ms) Rendered plugins/additionals/app/views/additionals/_html_head.html.slim (0.6ms) Rendered plugins/additionals/app/views/additionals/_body_top.slim (0.2ms) Rendered plugins/additionals/app/views/additionals/_content.html.slim (0.2ms) Rendered plugins/redmineup_tags/app/views/tags/_select2_transformation_rules.html.erb (0.3ms) Rendered plugins/additionals/app/views/additionals/_body_bottom.html.slim (0.3ms) Completed 200 OK in 59ms (Views: 44.0ms | ActiveRecord: 5.0ms)

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116948450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRA3SLWCAWR3RPEXXETVIIETJANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

image image image I sent you attachment

phuongnl15395 commented 2 years ago

image

HugoHasenbein commented 2 years ago

and below Libre there is a mark like this?

phuongnl15395 commented 2 years ago

image image Yes

HugoHasenbein commented 2 years ago

Gee, that's a tough one. I want to make the plugin more robust, so good you send me your information.

Just as an experiment: try to rename your document with only ASCII characters, like test.docx and try to preview the test.docx file. I want to make sure, there is no character encoding issue with the filename, when the plugin tries to determine, the file type with mimemagic.

Am 04.05.2022 um 07:59 schrieb phuongnl15395 @.***>:

https://user-images.githubusercontent.com/67360660/166629509-480d13e9-5a46-4566-ad6c-f45249462cbe.png https://user-images.githubusercontent.com/67360660/166629527-8ae153f7-989b-42b0-a3cc-7995212d2d76.png Yes

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116955141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRBUTTI27NGPZAVSPOLVIIG4DANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

image I already tried it before. You can see it here, just take another screenshot for you

HugoHasenbein commented 2 years ago

I never had this issue before.

would you mind, amending the code according to my instructions to see, what is going on?

in

redmine_more_previews/lib/redmine_more_previews/patches/attachments_controller_patch.rb

go to line 141 and add the following lines of code

141 def show_with_more_previews

 Rails.logger.info @attachment
 Rails.logger.info @attachment.preview_convertible?
 Rails.logger.info RedmineMorePreviews::Converter.mime( @attachment.diskfile )
 Rails.logger.info RedmineMorePreviews::Converter.conversion_mime( @attachment.diskfile )

142 if request.format.html? && @attachment.preview_convertible? 143 render :action => 'more_preview', :formats => :html 144 else 145 show_without_more_previews 146 end 147 end #def

you should get a log file output like

 Rails.logger.info @attachment
 Rails.logger.info @attachment.preview_convertible?
 Rails.logger.info RedmineMorePreviews::Converter.mime( @attachment.diskfile )
 Rails.logger.info RedmineMorePreviews::Converter.conversion_mime( @attachment.diskfile )

you should see something like this

Processing by AttachmentsController#show as HTML Parameters: {"id"=>"11876", "filename"=>"test.docx"} Current user: admin (id=1)

true {"active"=>"1", "format"=>"html", "converter"=>"libre", "mime"=>"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "synonyms"=>nil, "icon"=>"docx.png"} text/html Rendering plugins/redmine_more_previews/app/views/attachments/more_preview.html.erb within layouts/base Rendered plugins/redmine_more_previews/converters/cliff/app/views/redmine_more_previews/hooks/_cliff_preview_attachment_contextual.html.erb (2.1ms) Rendered plugins/redmine_more_previews/converters/cliff/app/views/redmine_more_previews/hooks/_cliff_preview_attachment_top.html.erb (1.8ms) Rendered layouts/_file.html.erb (22.9ms) Rendered plugins/redmine_more_previews/app/views/attachments/more_preview.html.erb within layouts/base (23.8ms) Rendered plugins/redmine_business_case/app/views/hooks/redmine_business_case/_css.html.erb (0.1ms) Rendered plugins/redmine_business_case/app/views/hooks/redmine_business_case/_javascripts.html.erb (0.1ms) Rendered plugins/redmine_more_filters/app/views/hooks/redmine_more_filters/_toggle_operator.html.erb (0.1ms) Rendered plugins/redmine_more_filters/app/views/hooks/redmine_more_filters/_css.html.erb (0.2ms) Rendered plugins/redmine_all_thumbnails/app/views/hooks/_html_head.html.erb (0.1ms) Rendered plugins/redmine_attachment_categories/app/views/hooks/attachment_categories/_html_head.html.erb (0.1ms) Rendered plugins/redmine_issue_attachments/app/views/hooks/issue_attachments/_view_layouts_base_html_head.html.erb (0.1ms) Rendered plugins/redmine_business_case/plugins/google_geo_code/app/views/hooks/redmine_business_case/google_geo_code/_css.html.erb (0.2ms) Rendered plugins/redmine_more_previews/app/views/hooks/redmine_more_previews/_icon_css.html.erb (2.2ms) Rendered plugins/redmine_scripting_engine/app/views/hooks/redmine_scripting_engine/_css.html.erb (0.2ms) Rendered plugins/redmine_scripting_engine/app/views/hooks/redmine_scripting_engine/_js.html.erb (0.1ms) Rendered plugins/redmine_scripting_engine/app/views/hooks/redmine_scripting_engine/_global_sidebar.html.erb (33.7ms) Completed 200 OK in 137ms (Views: 93.0ms | ActiveRecord: 9.9ms) Started GET "/attachments/more_preview/11876/index.html" for 90.187.193.33 at 2022-05-04 06:41:47 +0000 Processing by AttachmentsController#more_preview as HTML Parameters: {"id"=>"11876"} Current user: admin (id=1) Rendering text template Rendered text template (0.0ms) Sent data index.html (1.4ms) Completed 200 OK in 9057ms (Views: 0.5ms | ActiveRecord: 46.0ms)

if you do see something like this

true {"active"=>"1", "format"=>"html", "converter"=>"zippy", "mime"=>"application/zip", "synonyms"=>nil, "icon"=>nil} text/html

then there is a mimemagic issue. Sometimes mimemagic fails to recognize word docx documents as docx, but it recognizes them as zip files.

Am 04.05.2022 um 08:05 schrieb phuongnl15395 @.***>:

https://user-images.githubusercontent.com/67360660/166630023-f63ce0f0-8dc6-47b8-93a0-0d65e04abed6.png I already tried it before. You can see it here, just take another screenshot for you

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116957726, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRB7ERIPLHOUQVWQ7JDVIIHSDANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

HugoHasenbein commented 2 years ago

to make things easier: try to preview the attached word-file.

Am 04.05.2022 um 08:05 schrieb phuongnl15395 @.***>:

https://user-images.githubusercontent.com/67360660/166630023-f63ce0f0-8dc6-47b8-93a0-0d65e04abed6.png I already tried it before. You can see it here, just take another screenshot for you

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1116957726, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRB7ERIPLHOUQVWQ7JDVIIHSDANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

letme try then i will reply back to you

phuongnl15395 commented 2 years ago

image image

phuongnl15395 commented 2 years ago

Am I do it correctly?

HugoHasenbein commented 2 years ago

did you restart redmine after the amendment?

Am 04.05.2022 um 09:43 schrieb phuongnl15395 @.***>:

https://user-images.githubusercontent.com/67360660/166640316-4cb600a6-aa32-40bf-a2d8-039f704f89b6.png https://user-images.githubusercontent.com/67360660/166640503-1f992cac-9c7d-4bcc-8ae5-1662026f83fa.png — Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1117016871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRELDZNDJKSXURWJBVLVIITAVANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

Yes I did,

HugoHasenbein commented 2 years ago

Ok, this is an issue I had not in the past.

The attachment_controller patch is not executed at all, it seems. Else the log file should have shown some output.

Go to the console

rails c -e production

in there type

AttachmentsController.new.methods.include?(:show_with_more_previews)

it should result with 'true'

Am 04.05.2022 um 10:02 schrieb phuongnl15395 @.***>:

Yes I did,

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1117030983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRHZ3TLL4PLZWBXBRW3VIIVIBANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

image Its false

HugoHasenbein commented 2 years ago

good, actually not good, but this is a first hint. I suspect a plugin collision.

could you move all plugins but this plugin into another folder, let's say to a folder named "deactivated_plugins", which is a sibling of the plugins folder. Restart redmine and try again rails console

Am 04.05.2022 um 10:13 schrieb phuongnl15395 @.***>:

https://user-images.githubusercontent.com/67360660/166644506-6cb39281-5111-4e82-b3bf-f06b680c74d7.png Its false

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1117040117, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRHXNYMXMVZCAHU5IWLVIIWSPANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

I dont think its a good idea because you can see it's currently production env. Any other option?

shurakenas commented 2 years ago

I have the same problems with this plugin.

HugoHasenbein commented 2 years ago

Then do

AttachmentsController.ancestors

in the console and send me the out put as text

There will be no sensitive information in the output, but I will need more than a few minutes to peruse the information

Thank your for your patience, it helps to make the plugin better

Am 04.05.2022 um 10:26 schrieb phuongnl15395 @.***>:

I dont think its a good idea because you can see it's currently production env. Any other option?

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1117050463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRGK4CZQTEHDOBBDVMDVIIYCXANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

phuongnl15395 commented 2 years ago

@HugoHasenbein 2.6.3 :003 > AttachmentsController.ancestors => [AttachmentsController, RedmineLightbox2::AttachmentsPatch, #, ApplicationController, Additionals::Patches::ApplicationControllerPatch::InstanceMethods, Additionals::Patches::ApplicationControllerPatch, RedmineExtensions::RenderingHelper, RedmineExtensions::ApplicationControllerPatch::InstanceMethods, RedmineExtensions::ApplicationControllerPatch, Redmine::SudoMode::Controller, Redmine::MenuManager::MenuController, Redmine::Search::Controller, RoutesHelper, Redmine::Hook::Helper, Redmine::Pagination, Redmine::I18n, #, #, #, ActionController::Base, OpenIdAuthentication, RedmineupTags::Patches::ActionControllerPatch, InvisibleCaptcha::ControllerExt, ActiveRecord::Railties::ControllerRuntime, ActionDispatch::Routing::RouteSet::MountedHelpers, ActionController::ParamsWrapper, ActionController::Instrumentation, ActionController::Rescue, ActionController::HttpAuthentication::Token::ControllerMethods, ActionController::HttpAuthentication::Digest::ControllerMethods, ActionController::HttpAuthentication::Basic::ControllerMethods, ActionController::DataStreaming, ActionController::Streaming, ActionController::ForceSSL, ActionController::ContentSecurityPolicy, ActionController::RequestForgeryProtection, AbstractController::Callbacks, ActiveSupport::Callbacks, ActionController::FormBuilder, ActionController::Flash, ActionController::Cookies, ActionController::ParameterEncoding, ActionController::StrongParameters, ActiveSupport::Rescuable, ActionController::ImplicitRender, ActionController::BasicImplicitRender, ActionController::MimeResponds, AbstractController::Caching, AbstractController::Caching::ConfigMethods, AbstractController::Caching::Fragments, ActionController::Caching, ActionController::EtagWithFlash, ActionController::EtagWithTemplateDigest, ActionController::ConditionalGet, ActionController::Head, ActionController::Renderers::All, ActionController::Renderers, ActionController::Rendering, ActionView::Layouts, ActionView::Rendering, ActionController::Redirecting, ActiveSupport::Benchmarkable, AbstractController::Logger, ActionController::UrlFor, AbstractController::UrlFor, ActionDispatch::Routing::UrlFor, ActionDispatch::Routing::PolymorphicRoutes, ActionController::Helpers, AbstractController::Helpers, AbstractController::AssetPaths, AbstractController::Translation, AbstractController::Rendering, ActionView::ViewPaths, ActionController::Metal, AbstractController::Base, ActiveSupport::Configurable, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, ActiveSupport::Dependencies::Loadable, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, Kernel, BasicObject]

phuongnl15395 commented 2 years ago

@HugoHasenbein any update from my case?

phuongnl15395 commented 2 years ago

Hi @HugoHasenbein , I'm just cloning production instance to new one and remove all plugin except this plugin "redmine_more_previews". After installing + restart I ran into this problem This fresh without any plugin image After restart image

acosonic commented 2 years ago

I am too having

2.6.3 :001 > AttachmentsController.new.methods.include?(:show_with_more_previews)
 => false

And

AttachmentsController.ancestors => [RedmineMorePreviews::Patches::AttachmentsControllerPatch::ClassMethods, AttachmentsController, RedmineMorePreviews::ControllerHelper, RedmineMorePreviews::Patches::AttachmentsControllerPatch, RedminePreviewInline::Patches::AttachmentsControllerPatch::InstanceMethods, RedminePreviewInline::Patches::AttachmentsControllerPatch, RedmineAllThumbnails::Patches::AttachmentsControllerPatch::InstanceMethods, RedmineAllThumbnails::Patches::AttachmentsControllerPatch, RedmineLightbox2::AttachmentsPatch, #<Module:0x000055914a29f6e0>, ApplicationController, Spectator::Patches::ApplicationControllerInstanceMethods, Spectator::Patches::ApplicationControllerPatch, RedmineExtensions::RenderingHelper, RedmineExtensions::ApplicationControllerPatch::InstanceMethods, RedmineExtensions::ApplicationControllerPatch, Redmine::SudoMode::Controller, Redmine::MenuManager::MenuController, Redmine::Search::Controller, AvatarsHelper, GravatarHelper::PublicMethods, RoutesHelper, Redmine::Hook::Helper, Redmine::Pagination, Redmine::I18n, #<Module:0x0000559148dfb5b8>, #<Module:0x00005591488c1610>, #<Module:0x00005591488c1660>, ActionController::Base, OpenIdAuthentication, InvisibleCaptcha::ControllerExt, ActiveRecord::Railties::ControllerRuntime, ActionDispatch::Routing::RouteSet::MountedHelpers, ActionController::ParamsWrapper, ActionController::Instrumentation, ActionController::Rescue, ActionController::HttpAuthentication::Token::ControllerMethods, ActionController::HttpAuthentication::Digest::ControllerMethods, ActionController::HttpAuthentication::Basic::ControllerMethods, ActionController::DataStreaming, ActionController::Streaming, ActionController::ForceSSL, ActionController::ContentSecurityPolicy, ActionController::RequestForgeryProtection, AbstractController::Callbacks, ActiveSupport::Callbacks, ActionController::FormBuilder, ActionController::Flash, ActionController::Cookies, ActionController::ParameterEncoding, ActionController::StrongParameters, ActiveSupport::Rescuable, ActionController::ImplicitRender, ActionController::BasicImplicitRender, ActionController::MimeResponds, AbstractController::Caching, AbstractController::Caching::ConfigMethods, AbstractController::Caching::Fragments, ActionController::Caching, ActionController::EtagWithFlash, ActionController::EtagWithTemplateDigest, ActionController::ConditionalGet, ActionController::Head, ActionController::Renderers::All, ActionController::Renderers, ActionController::Rendering, ActionView::Layouts, ActionView::Rendering, ActionController::Redirecting, ActiveSupport::Benchmarkable, AbstractController::Logger, ActionController::UrlFor, AbstractController::UrlFor, ActionDispatch::Routing::UrlFor, ActionDispatch::Routing::PolymorphicRoutes, ActionController::Helpers, AbstractController::Helpers, AbstractController::AssetPaths, AbstractController::Translation, AbstractController::Rendering, ActionView::ViewPaths, ActionController::Metal, AbstractController::Base, ActiveSupport::Configurable, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, ERB::Util, ActiveSupport::Dependencies::Loadable, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, Kernel, BasicObject]

Version Redmine 4.1.0.stable

HugoHasenbein commented 2 years ago

Dear Aleksandar,

with version 4.x this test has become obsolete, as from version 4.x on, the "prepend"-method is used to patch redmine. So, the plugin does not work? What ate the symptoms? Can you send a log file excerpt?

Best regards

Stephan Am 2022-05-10 14:47, schrieb Aleksandar Pavić:

I am too having

2.6.3 :001 > AttachmentsController.new.methods.include?(:show_with_more_previews) => false

And

AttachmentsController.ancestors => [RedmineMorePreviews::Patches::AttachmentsControllerPatch::ClassMethods, AttachmentsController, RedmineMorePreviews::ControllerHelper, RedmineMorePreviews::Patches::AttachmentsControllerPatch, RedminePreviewInline::Patches::AttachmentsControllerPatch::InstanceMethods, RedminePreviewInline::Patches::AttachmentsControllerPatch, RedmineAllThumbnails::Patches::AttachmentsControllerPatch::InstanceMethods, RedmineAllThumbnails::Patches::AttachmentsControllerPatch, RedmineLightbox2::AttachmentsPatch, #, ApplicationController, Spectator::Patches::ApplicationControllerInstanceMethods, Spectator::Patches::ApplicationControllerPatch, RedmineExtensions::RenderingHelper, RedmineExtensions::ApplicationControllerPatch::InstanceMethods, RedmineExtensions::ApplicationControllerPatch, Redmine::SudoMode::Controller, Redmine::MenuManager::MenuController, Redmine::Search::Controller, AvatarsHelper, GravatarHelper::PublicMethods, RoutesHelper, Redmine::Hook::Helper, Redmine::Pagination, Redmine::I18n, #,

, #,

ActionController::Base, OpenIdAuthentication, InvisibleCaptcha::ControllerExt, ActiveRecord::Railties::ControllerRuntime, ActionDispatch::Routing::RouteSet::MountedHelpers, ActionController::ParamsWrapper, ActionController::Instrumentation, ActionController::Rescue, ActionController::HttpAuthentication::Token::ControllerMethods, ActionController::HttpAuthentication::Digest::ControllerMethods, ActionController::HttpAuthentication::Basic::ControllerMethods, ActionController::DataStreaming, ActionController::Streaming, ActionController::ForceSSL, ActionController::ContentSecurityPolicy, ActionController::RequestForgeryProtection, AbstractController::Callbacks, ActiveSupport::Callbacks, ActionController::FormBuilder, ActionController::Flash, ActionController::Cookies, ActionController::ParameterEncoding, ActionController::StrongParameters, ActiveSupport::Rescuable, ActionController::ImplicitRender, ActionController::BasicImplicitRender, ActionController::MimeResponds, AbstractController::Caching, AbstractController::Caching::ConfigMethods, AbstractController::Caching::Fragments, ActionController::Caching, ActionController::EtagWithFlash, ActionController::EtagWithTemplateDigest, ActionController::ConditionalGet, ActionController::Head, ActionController::Renderers::All, ActionController::Renderers, ActionController::Rendering, ActionView::Layouts, ActionView::Rendering, ActionController::Redirecting, ActiveSupport::Benchmarkable, AbstractController::Logger, ActionController::UrlFor, AbstractController::UrlFor, ActionDispatch::Routing::UrlFor, ActionDispatch::Routing::PolymorphicRoutes, ActionController::Helpers, AbstractController::Helpers, AbstractController::AssetPaths, AbstractController::Translation, AbstractController::Rendering, ActionView::ViewPaths, ActionController::Metal, AbstractController::Base, ActiveSupport::Configurable, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, ERB::Util, ActiveSupport::Dependencies::Loadable, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, Kernel, BasicObject]

Version Redmine 4.1.0.stable

-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you were mentioned.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1122346227", "url": "https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1122346227", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Links:

[1] https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1122346227 [2] https://github.com/notifications/unsubscribe-auth/AJWRDRDVOAAEIAPEFYBHXNTVJJLG5ANCNFSM5T3BPEJA

acosonic commented 2 years ago

If I try to preview xlsx as image I get:

ActionController::RoutingError (No route matches [GET] "/tmp/mini_magick20220511-502327-1a96zhk.png"):

If I try to preview as html

then no error, but nothing previewed ...

acosonic commented 2 years ago

I can provide you with ssh access to that particular instance...

HugoHasenbein commented 2 years ago

that would help :-)

Am 11.05.2022 um 21:32 schrieb Aleksandar Pavić @.***>:

I can provide you with ssh access to that particular instance...

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1124210112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRESG42U4ZYX2NNIRTTVJQDN7ANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

ashrafalzyoud commented 2 years ago

@acosonic can u give in nginx

znkey commented 2 years ago

Try to Open it in project setting page

HugoHasenbein commented 1 year ago

Dear Phuong,

I suspect a plugin collision due to the new patching scheme introduced with Rails 5 / redmine 4.

To keep compatibility with both versions, namely redmine < 4.0 and >= 4.0 I circumvented the patching scheme by a generally known alternative to alias_method_chain, which has been deprecated with Rails 5.

Please try attached version 4.0.0.a, which now uses the prepend-method to patch existing classes. If a plugin collision caused the effect, that you report, due to this particular incompatibility, then this version should work.

Unpack the tgz file (the folder should have the name 'redmine_more_previews' not redmine_more_previews-4.0.0a in the plugins folder and tell me how this version behaves.

Best regards

Stephan

Am 04.05.2022 um 10:41 schrieb phuongnl15395 @.***>:

@HugoHasenbein https://github.com/HugoHasenbein 2.6.3 :003 > AttachmentsController.ancestors => [AttachmentsController, RedmineLightbox2::AttachmentsPatch, #Module:0x00000000065219c0, ApplicationController, Additionals::Patches::ApplicationControllerPatch::InstanceMethods, Additionals::Patches::ApplicationControllerPatch, RedmineExtensions::RenderingHelper, RedmineExtensions::ApplicationControllerPatch::InstanceMethods, RedmineExtensions::ApplicationControllerPatch, Redmine::SudoMode::Controller, Redmine::MenuManager::MenuController, Redmine::Search::Controller, RoutesHelper, Redmine::Hook::Helper, Redmine::Pagination, Redmine::I18n, #Module:0x000000000165a198, #Module:0x00000000027fb460, #Module:0x00000000027fb500, ActionController::Base, OpenIdAuthentication, RedmineupTags::Patches::ActionControllerPatch, InvisibleCaptcha::ControllerExt, ActiveRecord::Railties::ControllerRuntime, ActionDispatch::Routing::RouteSet::MountedHelpers, ActionController::ParamsWrapper, ActionController::Instrumentation, ActionController::Rescue, ActionController::HttpAuthentication::Token::ControllerMethods, ActionController::HttpAuthentication::Digest::ControllerMethods, ActionController::HttpAuthentication::Basic::ControllerMethods, ActionController::DataStreaming, ActionController::Streaming, ActionController::ForceSSL, ActionController::ContentSecurityPolicy, ActionController::RequestForgeryProtection, AbstractController::Callbacks, ActiveSupport::Callbacks, ActionController::FormBuilder, ActionController::Flash, ActionController::Cookies, ActionController::ParameterEncoding, ActionController::StrongParameters, ActiveSupport::Rescuable, ActionController::ImplicitRender, ActionController::BasicImplicitRender, ActionController::MimeResponds, AbstractController::Caching, AbstractController::Caching::ConfigMethods, AbstractController::Caching::Fragments, ActionController::Caching, ActionController::EtagWithFlash, ActionController::EtagWithTemplateDigest, ActionController::ConditionalGet, ActionController::Head, ActionController::Renderers::All, ActionController::Renderers, ActionController::Rendering, ActionView::Layouts, ActionView::Rendering, ActionController::Redirecting, ActiveSupport::Benchmarkable, AbstractController::Logger, ActionController::UrlFor, AbstractController::UrlFor, ActionDispatch::Routing::UrlFor, ActionDispatch::Routing::PolymorphicRoutes, ActionController::Helpers, AbstractController::Helpers, AbstractController::AssetPaths, AbstractController::Translation, AbstractController::Rendering, ActionView::ViewPaths, ActionController::Metal, AbstractController::Base, ActiveSupport::Configurable, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, ActiveSupport::Dependencies::Loadable, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, Kernel, BasicObject]

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1117062582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRDJYUJ3VWBFUVOREQTVIIZ23ANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

HugoHasenbein commented 1 year ago

didn't you ttry version 4.0.0a, which hopefully does not interfere with other plugins?

Am 05.05.2022 um 04:55 schrieb phuongnl15395 @.***>:

@HugoHasenbein https://github.com/HugoHasenbein any update from my case?

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1118116579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRDM4XTW63E4P5EYUD3VIM2DPANCNFSM5T3BPEJA. You are receiving this because you were mentioned.

HugoHasenbein commented 1 year ago

Dear Phuong,

we'll get that issue sooner or later. Please, try to open a rails console

rails c -e production

It should throw an error message.

Best regards

Stephan

Am 09.05.2022 um 05:22 schrieb phuongnl15395 @.***>:

Hi @HugoHasenbein https://github.com/HugoHasenbein , I'm just cloning production instance to new one and remove all plugin except this plugin "redmine_more_previews". After installing + restart I ran into this problem This fresh without any plugin https://user-images.githubusercontent.com/67360660/167334566-8715bd42-1cb9-4c0b-8084-bcf75b4e050f.png After restart https://user-images.githubusercontent.com/67360660/167334603-a4a16a5d-d066-4518-b469-d760889b4d9b.png — Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/51#issuecomment-1120596395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRCSB2QNAQCR2EQI4U3VJCAI5ANCNFSM5T3BPEJA. You are receiving this because you were mentioned.