paginagmbh / redmine_lightbox2

Lightbox for image attachments in Redmine
MIT License
126 stars 97 forks source link

Images always downloading Redmine 4.0.3 lightbox 0.5.0 #68

Open strannick-ru opened 5 years ago

strannick-ru commented 5 years ago

Try to fix, like here https://github.com/paginagmbh/redmine_lightbox2/issues/65 Bad luck. Not works.

tofi86 commented 4 years ago

Which browser are you using?

Can you update your Redmine and the plugin to the latest version? I added some new features to the master branch today but didn't release a new version yet. Can you test the version from master?

The most important part is to run the migrations to copy the javascripts in place:

cd $REDMINE_HOME
rake redmine:plugins:migrate RAILS_ENV=production NAME=redmine_lightbox2

(Or maybe try with bundle exec rake ...)

If you do this, there's no need to copy cp -R the assets as suggested in #65

If it's still not working, can you check in your browser inspector that the lightbox javascripts are being loaded? There should be some references like

<script src="/plugin_assets/redmine_lightbox2/javascripts/lightbox.js?1569447594"></script>
tofi86 commented 4 years ago

@strannick-ru have you been able to check my suggestions?

mmxbow commented 4 years ago

Have the same problem @strannick-ru had: a click on a pdf file shows empty pages only (pic. 3), for a image (png, jpg) a display like in the pic.4.

1 2 3 4

alvaropag commented 4 years ago

Hello,

I'm having the same problem. It works ok on Chrome, but when firefox is used, instead of showing the PDF it is downloading it. Images are ok, just PDF are not showing up. I've updated redmine to 4.0.5 and the problem persists. Although I'm not an experienced ruby developer I can help test it if you have any hints on what can be happening.

tofi86 commented 4 years ago

@mmxbow Thanks for providing screenshots for more context! This helped me understand your issue!

At the moment, this plugin only supports image previews in issues and wiki pages. Not in the "Files" module.

I will add support for this with #72

@alvaropag @strannick-ru can you specify on which Redmine page you tried the lightbox and it didn't work? Also in "Files" view?

alvaropag commented 4 years ago

I tried on the Issue page...

tofi86 commented 4 years ago

@alvaropag that's odd. It should work on the Issue page. Can you post a screenshot of the page with visible attachments view or the section you would expect the plugin to work?

I'm constantly developing in Firefox and PDF preview is currently working for me on Mac OS with FF 70 wit latest version from master branch:

grafik

If you visit your Firefox settings and look for Applications, flter for pdf, what does it say? Preview in Firefox?

grafik

alvaropag commented 4 years ago

@tofi86 I'll test tomorrow because I don't have access to Redmine outside the company network. I was on FF 70, ubuntu 19.10, lightbox 0.5.0. I'll also verify what option is set for PDF on my FF conf. Thanks for the help!

alvaropag commented 4 years ago

Hello @tofi86 it's working ok now... FF was downloading the file because PDF was set to "Save file" in the configuration. I changed it to "Preview in Firefox" and it resolved. Thanks for the help!

tofi86 commented 4 years ago

@alvaropag awesome, glad it works for you now :-)