Some images get lightboxed, some not - in the same post


(Bianka Hajdu) #1

We have been observing that while some images get “lightboxed” (amplifiable upon clicking), others do not. Here is an example from our forum. Both images are larger than 690px, however only the first one gets “lightboxed”. Any idea why this is happening? Thanks a lot!


(Jeff Atwood) #2

Are they uploaded images or hotlinked external urls?


(Bianka Hajdu) #3

They are all uploaded images.


(Rafael dos Santos Silva) #4

Both worked fine on try: Whoa. Check out this crazy paper artwork - general - Demo


(Joshua Rosenfeld) #5

@Falco your example has a blank line between the images, could that have anything to do with it?

https://community.darwinex.com/raw/443/2

https://try.discourse.org/raw/77/6


(Bianka Hajdu) #6

We have already tried adding a line or a paragraph between images - with no success.

In this post, for example, both images get lightboxed, but when copying the same text in a new post, the second image has no lightbox.


(Régis Hanol) #7

Is there anything in https://community.darwinex.com/logs that might be related to creating optimized images? There might be a problem with these images.


(Bianka Hajdu) #8

Thank your for this tip, we’ll review this!


(Otto G) #9

EDIT: I finally managed to fix it with a combination of: dns changed at our provider, database remapping of every ocurrence with the wrong url, posts:rebake, and reverting all things tested before, like changing docker dns, changing template config, edited hosts and so, nothing of that was needed and at the end probably was making the situation worse. On sidekiq it did like 30k row changes, so patience is also the key.
If somebody gets into the same situation I will be willing to share the details of what I did.

We are having the same problem in our forum, I tried to change dns config as I saw in another posts, rebake:posts, change forum configurations…

It happens with uploaded or pasted images, lightbox is not appearing,
/logs
does not show anything related…
Can I have any clue on directions to follow for fixing this annoying bug?
Thanks in advance.

EDIT: I found some message in our logs…
http://pastebin.com/hJh2ZLBS


(giorgia) #10

i also get the same problem in our forum and for us the solution was:

  • image that are dropped into the “new post WYSIWYG” editor don’t have a lightbox
  • images that are uploaded with upload button in WYSIWYG, get lightbox and possibility to be dowloaded.

(Jeff Atwood) #11

Are you talking about a plugin editor here? No such behavior exists in Discourse proper.


(giorgia) #12

I’m talking about these:


(giorgia) #13

I notice that some times when you just drop images in the editor [screenshot 1 above] the image are not shown in a lightbox


(Jeff Atwood) #14

Do you mean the final rendered output on the page, after refreshing the browser? There is a sidekiq background task that converts images to lightboxes.

Note that if the image is very small it doesn’t need to be lightboxed, and wil not be.


(giorgia) #15

i see. Could be that they where too small then. I can understand that small image doesn’t need to be lightboxed but is a bit confiusing for final user to have some image lightboxes and some other don’t.
Maybe we could put a small message when image get lightboxes like: Your image will be display in lightbox mode because exceed the xxx size.

Also, on my development enviroment no images get lightboxed, and i also cannot see most of the icons.
I thought was a problem with sidekiq but i run bundle exec sidekiq -q critical,low,default -d -l log/sidekiq.log and still don’t see images/icons.
Any suggestion on what I can try to make it work?


Is there any reason why small images don't have thumbnails?