archetyped / simple-lightbox

The highly customizable lightbox for WordPress
http://archetyped.com/tools/simple-lightbox/
GNU General Public License v2.0
73 stars 33 forks source link

Lightbox not working with WP Rocket #982

Closed Andyscotsman closed 1 year ago

Andyscotsman commented 1 year ago

Hi, and thank you for the sustained development of Simple Lightbox. I've been using your plugin on my WordPress website carvibz for many months and the efficient experience has been brilliant!

The Issue

Unfortunately, when I activate two WP Rocket options*, which I currently need to increase page speed, the images in the Lightbox are not displayed at all or display improperly.

*[1]WP Rocket's Lazy Load for images: the pic is no longer displayed, with the Lightbox showing "The image # 1 could not be loaded." short demo video uploaded on Github

[2]WP Rocket's File Optimization->CSS Files->Removed unused CSS: the Lightbox area is shown empty (in grey), with the pic displayed way below this.

short demo video uploaded on Github

The rest of the WP Rocket features are on (there's a list at the bottom of the message) and there's no issue with Simple Lightbox.

The problem manifests on both mobile and desktop—the mobile theme is actually a responsive desktop one. It happens across any of the post pages that galleries (basically, any news on the site) and I've tested with the Chrome browser.

The setup

Akismet Anti-Spam GN Publisher No Self Pings Post Views Counter Really Simple SSL Site Kit by Google tagDiv Cloud Library tagDiv Composer tagDiv Newsletter tagDiv Social Counter tagDiv Standard Pack Wordfence Security WP Rocket WPCode Lite Yoast SEO

WP Rocket settings: Cache: Mobile Cache [Yes] Enable caching for mobile devices [Yes] Separate cache files for mobile devices

File Optimization: CSS Files [Yes] Minify CSS files [No] Combine CSS files [Yes] Optimize CSS delivery ![Breaks Lightbox, so No]! Removed unused CSS [Yes] Load CSS Asynchronously

JavaScript Files [Yes]Minify JavaScript files [No]Combine JavaScript files [Yes]Load JavaScript deferred [Yes]Delay JavaScript execution

Media: Lazyload ![Breaks Lightbox, so No]! Enable for images [Yes] Replace YouTube iframe with preview image

Image Dimensions [Yes] Add missing image dimensions

Preload: Preload Cache [Yes]Activate Preloading

Preload Links [Yes] Enable link preloading

Heartbeat: [Yes]Control Heartbeat


Is there any known way to address this?

Thank you for the support!

archetyped commented 1 year ago

Hi, video clip you provided does not appear to show SLB, but a different lightbox added by the theme or another plugin. In general, running multiple lightbox plugins simultaneously is not recommended since they perform the same general task and thus can conflict with each other.

Here are instructions on identifying theme/plugin conflicts that you can use to determine how the other lightbox is being added and disable it.

WP Rocket

Different caching plugins handle things differently, but the first step if the plugin's modifications are too aggressive is to exclude SLB's files from being processed by the caching plugin.

Also, disabling "Load JavaScript deferred" and "Delay JavaScript execution" options to see if that allows SLB to work is also recommended. You can then work backwards from there to see what settings prevent SLB from working.

As WP Rocket is a paid/private plugin, access to the plugin for further evaluation cannot be guaranteed, but let me know what you find, including the point at which point SLB stops working, and I'll see what can be done from SLB's end.

If you are still experiencing an issue with SLB after taking the above steps, please provide a specific link (not just a link to the home page) that exhibits the issue and I would be glad to take a look.

archetyped commented 1 year ago

This ticket has been closed due to inactivity. If you are still experiencing an issue with SLB, please provide the previously-requested details and I would be glad to reopen the ticket and take a look.