Is the Gallery Block's lightbox feature dependent on Cwicly theme?

Howdy there Cwicly Crew!

I’m trying to do an experiment with a split WP build by using Pinegrow for working up the base Classic WP theme & Cwicly for handling the content. Not all that unexpected but I’ve been running into some oddities with some things not working as expected which brings me to my question.

Is Cwicly’s Gallery Block’s lightbox feature dependent on Cwicly theme?

I’ve been trying to use the lightbox feature on a gallery in my Pinegrow/Cwicly build and when clicking on an image in the gallery it just opens the image up in the browser window with no lightbox. As a test, I built out basically the same gallery on a test site using the Cwicly theme and the lightbox feature worked as expected.

Thanks in advance for any input on this.

Hi,

Cwicly theme is pretty barebones. It’s just there to enable site editor, avoid compatibility issues and comments styling last I checked. I think some asset from the Pinegrow classic theme interfering with the lightbox. Any error in the console?

Hi @dranzer, Thanks for the reply.

Unfortunately no errors in the console on the Pinegrow theme but plenty on the Cwicly theme where the lightbox is actually working (see attached for a few of those). It’s kind of odd, almost like the Javascript isn’t firing on the lightbox on the Pinegrow theme which is why I asked if there was a dependency on the Cwicly theme for it to work.

I see. Any link to check the gallery page with PG theme activated?

Unfortunately, that install is running locally on my computer so it wouldn’t be accessible without some effort.

Hi @chipriggs,

The Cwicly Theme has no impact on importing JS libraries, Cwicly blocks automatically do that.
In the case you are using attributes to launch the Lightbox, make sure that you are importing the Lightbox script manually (assets/js/).

If I’m not mistaken, those are not errors, not warnings, but information notices. They only spring up when you open a lightbox, and will equal the number of opened images.

1 Like

Hi @Louis,

Thanks for the reply. On both installs, I was just using a standard Cwicly gallery block with the “Link > Lightbox” setting applied. Nothing fancy and no attributes to launch the lightbox. Just the standard settings that Cwicly provides.

I have a feeling that there’s something leftover in my theme from Pinegrow’s Interactions that are probably causing some kind of issue. I was experimenting with building my own gallery & sliders with it but ultimately ended up deciding to go a different direction because of the time it takes to do so and wanting to move forward with the project at hand rather than being mired down in technical minutia. Unfortunately, there isn’t any documentation on removing the remnants of those previous efforts so I might be left with the cruft for the foreseeable future although I am going to reach out on their forum to see if I’m possibly missing something obvious.

To hopefully get to the bottom of this, I’m going to go ahead and make a clone of my local install out on my public dev server and if you would be so kind to take a look at it I’d appreciate it. I’ll DM you here once it’s available.

Thanks!

Hi @Louis , @chipriggs
I have same lightbox (image or gallery) problem but with Oxygen builder (template design) + Cwicly (for posts content).
No errors in console and js loads fine ( /wp-content/plugins/cwicly/assets/js/lightbox.js?ver=1.2.6).
When Oxygen plugin turn on - missing click event on image:
image

1 Like

@Louis My Pinegrow/Cwicly install is still running on the web on the URL I DM’ed you. Please feel free to use the log-in I set up for you to investigate the issue if it will help. - Chip

2 Likes

Hi @Slyte,

I’m sorry for the inconvenience.
This is interesting.

Thanks @chipriggs for the access! I made a change that might break the JS on other pages that don’t have the lightbox enabled, so please let me know if you want me to reset it. This change makes it work on my side, could you see if it’s ok for you?

@Slyte seems like a loading order issue. Please bear with me while we apply a small fix for this in the next update (tomorrow :crossed_fingers:)

3 Likes

No worries on my end, I just put that install up so you could take a look at the code to see what was possibly going awry. I’ll probably just delete it in the next day or so.

The lightbox is totally functional now, so it looks like switching up the loading order did the trick. Unfortunately, because it’s a demo install there aren’t really any other pages with JS for me to test on. I’ll see if I can’t throw something together by morning as a test.

Hi @Louis,

Unfortunately, I absentmindedly updated Cwicly (out of habit :grimacing:) to v1.2.6 and it broke the change that you made and the lightbox no longer works.

That said, I’ll just wait for you to push out the update you mentioned and give it a try again.

No, rush on my end, just letting you know that I won’t be able to test it as I previously mentioned. Thanks! - Chip

Just letting know that after update (1.2.7) lightbox works as intended.

2 Likes

Hi @Slyte,

Thanks for confirming this, much appreciated.
If you still experience trouble with something along these lines, please let me know :slight_smile:

Cheers,

2 Likes