paginagmbh / redmine_lightbox2

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

Images always downloading Redmine 3.4 lightbox 0.4 #65

Closed praet0ri4n closed 5 years ago

praet0ri4n commented 5 years ago

Hi,

I can't get images to display in the browser in lightbox. They are downloading all the time. How can I get it to work? Thank you!

Environment:
  Redmine version                3.4.4.stable
  Ruby version                   2.5.1-p57 (2018-03-29) [x86_64-linux-gnu]
  Rails version                  4.2.10
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.17.1
  Filesystem                     
Redmine plugins:
  redmine_lightbox2              0.4.4
cliaoxpg commented 5 years ago

Please don't download the 3.4 branch zip file directly, Instead, use the following script to setup: _cd $REDMINE_HOME/plugins/ git clone https://github.com/paginagmbh/redmine_lightbox2.git git checkout redmine-3.4 mkdir $REDMINE_HOME/public/plugin_assets/redmine_lightbox2 cp -R $REDMINE_HOME/plugins/redmine_lightbox2/assets/* $REDMINE_HOME/public/plugin_assets/redmine_lightbox2 cd $REDMINE_HOME RAILSENV=production bundle exec rake redmine:plugins:migrate Then it works.

tofi86 commented 5 years ago

Can you try on the latest Redmine version 3.4.11 ? It works in all my tests in 3.4.11.

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.

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 5 years ago

@praet0ri4n have you been able to check my suggestions?

praet0ri4n commented 5 years ago

Hi tofi86, sorry, no not yet, i will try today evening and will let you know, thanks for support!

praet0ri4n commented 5 years ago

tofi86, it's working perfectly now! Thanks alot for this awesome plugin..

tofi86 commented 5 years ago

Wonderful! I'm closing this issue then...