Not possible to open images after 2.0.0 upgrade


(Chrfle) #1

After upgrading to 2.0.0 it’s no longer possible to open images. Before 2.0.0 when an image was hovered a black bar at the bottom of the image popped up and you could click the image for a larger view. Since 2.0.0 it’s just a static image in the post without any interaction.

It seems like this still works for old images, but not new uploads.

Any advice on where I would start to troubleshoot this?


(Robert McIntosh) #2

I think this was always the case for images that had not been reduced in size when uploaded.

Are the images you are clicking on and expecting to open actually larger than they are displayed?

Have you tested this on try.discourse.org or here to see if it is replicated? I’ve found recent images that still have the black bar / click to view enabled


(Chrfle) #3

It’s larger images. It seems like it’s the original image that is used in the post instead of an optimized image (which it is for the ones that works as expected). Seems like it’s the thumbnail generation or something that is broken.

It’s something special about my setup which makes it not work. It works as expected on try (although I guess try is the 2.1.0 beta).


(Régis Hanol) #4

Is sidekiq working properly? Are there any jobs stuck in the queue? Are there any errors in the logs?


(Chrfle) #5

Sidekiq seems to be running without any errors. I’m not sure how I can look at historical jobs to see if it has taken any action when I did the image upload.

I seem to have one error in the /logs path on web:

Job exception: no implicit conversion of nil into String
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/number_helper/number_to_human_size_converter.rb:25:in `gsub'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/number_helper/number_to_human_size_converter.rb:25:in `convert'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/number_helper/number_converter.rb:134:in `execute'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/number_helper/number_converter.rb:120:in `convert'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/number_helper.rb:264:in `number_to_human_size'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.0/lib/action_view/helpers/number_helper.rb:407:in `public_send'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.0/lib/action_view/helpers/number_helper.rb:407:in `block in delegate_number_helper_method'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.0/lib/action_view/helpers/number_helper.rb:431:in `wrap_with_output_safety_handling'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.0/lib/action_view/helpers/number_helper.rb:406:in `delegate_number_helper_method'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionview-5.2.0/lib/action_view/helpers/number_helper.rb:291:in `number_to_human_size'
    /var/www/discourse/lib/disk_space.rb:34:in `stats'
    /var/www/discourse/lib/disk_space.rb:47:in `block in cached_stats'
    /var/www/discourse/lib/scheduler/defer.rb:70:in `block in do_work'
    /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.5/lib/rails_multisite/connection_management.rb:63:in `with_connection'
    /var/www/discourse/lib/scheduler/defer.rb:68:in `do_work'
    /var/www/discourse/lib/scheduler/defer.rb:59:in `block (2 levels) in start_thread'

I didn’t find any errors in the ruby or unicorn logs… I think I have looked at the correct place.

I tried to upgrade to v2.1.0.beta2 with same result.

Re-baking the posts does not help.

Other info that might be relevant is that my discourse is running in an EC2 instance. Storage is on EBS which is mounted inside the EC2 instance.