Lightbox for images comes by default?

Sorry folks but I gotta ask

When I upload an image into a topic on my discourse installation, I can’t click on the image to bring up the lightbox of of the image.

Is that an extra plugin to get, or lightbox behaviour comes baked into discourse?

Creating thumbnails is working, because after upload, the embed image link looks like this

![170A8281|690x460](upload://ymbIAVokPLvrmTr6ceQQ16AKUdX.jpeg)

the ...|690x460] part confirms.

However, the uploaded images is way passed 4k x 4k dimension.

Is this a development or a production installation?

Did you follow the official installation guide when you set up the site? (if it’s a production installation)

Can you confirm there’s nothing unusual going in your sidekiq queues by visiting

your.site.come/sidekiq/

and checking the busy, enqued and scheduled tabs?

1 Like

My sidekiq doesn’t look encouraging

Yes, I followed the official installation guide. There doesn’t seem to be any mention of sideqik in there.

However, I guess my sideqik dashboard looks fine at this point.

It’s a production installation

Anything I might be missing?

1 Like

It’s intentional that there’s no mention of Sidekiq there, this is all supposed to work magically in the background without any action on your side. We make sure that it does.

The fact that it’s not working on your site points to a problem in your configuration.

It’s difficult to diagnose what the issue is without much context. So Please try to provide as much information as you can.

can I get a link to the site you’re having trouble with?
can you try safe-mode?
are you using Cloudflare?
do you see any errors in the browser console on pages with images that are supposed to be lightboxed?
do you see anything unusual in your.site.com/logs?

3 Likes

africa.packagetome.com (not the final domain, just a staging ground to play around)

Lightbox still doesn’t work in safe mode, with default theme and all plugins disabled.

Nope. Running everything on a Digitalocean 10$ VPS

No errors in browser console on pages with images supposed to be lightboxed

No way for me to know which is unusual, since I currently have no record of what the usual should be.

By usual, there shouldn’t be anything in the logs?

Here’s what I currently have in the logs

Any pointers anywhere to look further?

And also to mention, by default, after installation too, the lightbox ain’t working on this installation too

https://forum.devcongress.org

Also running on DO, followed installation guide, no CDN (everything loading from the VPS)

Magic is great, but perhaps it might be helpful and about time to have a section in the guide mentioning the magic and how to work around it should it not work as expected.

Thank you for the extra details :+1:

Not really, most admins don’t care how it works, just that it does, which again, is something that we care about a lot and we make sure that it works. I just set up a new test environment and everything seems to be working just fine on my end. If you’re a developer and really want to dig down into how it works, the please feel free to look at the source code.

I understand, but browsing through that site, I only see two public topics that have images

https://forum.devcongress.org/t/created-to-initialize-tags/36

and

Anyone still experiencing the on and off of the MTN TurboNet? - General - DevCongress

The images in both of those topics are too small to be lightboxed. You can control the minimum height and width for an image to be lightboxed via the max_image_width and the max_image_height

Images with dimensions bigger than those will be lightboxed. So, feel free to change those values according to your needs.

But I’m not saying that adding bigger images will work there.

I’m still looking at the issue at

africa.packagetome.com

Yes, you’re right. I uploaded a way bigger image, and the lightbox on the forum.devcongress.org works now.

Tried same image here: https://africa.packagetome.com/t/test-photo-image/37 , looked at the sidekiq job as it started and finished, no issues, yet the lightbox doesn’t show.

Also tried to view in Firefox. No lightbox still.

Yes, a developer. Will look around and see what I find.

Anyway, I’m using 2.4.0.beta4 (02731ef33e), in case that somehow matters.

1 Like

So outta frustration,

First post is this: https://africa.khophi.com/t/testing-photo-lightbox/11

Image dimension is 5471 x 2878, way bigger than what triggers the lightbox.

Still, lightbox not working. The magic is failing us (or me) this time. And because it’s magic, I wouldn’t even know where to begin debugging. No errors in console. No errors in logs, except this:

TypeError: Cannot read property 'create' of undefined
    at https://africa.khophi.com/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:2332
    at https://africa.khophi.com/assets/vendor-fae393575cd14697b31e9fdbeb8c016d165a8a3af765ec8ca719a454585aedf4.js:5:3286

@Johani It’s interesting you run it on yours and lightbox worked. I am following the install guide, verbatim from a literary entirely new droplet.

If need be, I’ll screencast the entire process of setting up later, so that you guys know I’m not pulling any ‘anti-magic’ tricks anywhere. Lightbox outta the box (pun intended) ain’t working, at least for me.

Now I’ve done all possible troubleshooting I can think of. Blank installation, still lightbox not working.

Otherwise I might screencast me installing a new discourse instance which leads lightbox not working, because something ain’t right, and I have a feeling the docs ain’t mentioning something.

Anyway, any more troubleshooting tips for me to look into?

So I’ve kinda run outta options and what else to look out for.

Am I the only one facing this?

Have exactly the same problem with 2.4.0.beta6 and Digital Ocean

Same problem here. Digital Ocean as well.

I have the same problem