• Hello!

    WordPress 5.6.4
    Easy FancyBox 1.8.18
    W3 Total Cache 2.1.1

    Please, check Easy FancyBox compatibility with W3 Total Cache.

    When W3TC is enabled, clicking on image just open this image in browser (as image). When is disabled, everything works fine.

    This is not cache problem – I cleared cache many times. This is not minify problem – no errors in browser console. Build-in theme lightbox works normal with W3TC (when tried to use your plugin, I disabled this lightbox in theme settings). Looks like W3TC just remove your plugin scripts from page. Don’t know, why. But this is very popular cache plugin, as you know, so you should be interested.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi Roman, thanks for reporting ?? I’ve not used W3TC for a long time but I’ll try to reproduce this and let you know soon.

    Update: I tried reproducing this with minifaction of javascript, css, html and inline script/css turned on but te light box remains functional.

    Can you share a link to a page where I can see it failing live?

    Thread Starter Roman

    (@vladroman)

    Sorry for delay, RavanH, I needed time for tests. Looks like Easy FancyBox works perfect for me, when W3TC Minify module is disabled. If enabled, doesn’t work. Don’t know, maybe something with my Minify settings. I started migration to W3TC not long time ago (but current settings has been working correctly for a few months, when I used theme build-in lightbox).

    Linking is problematic, because I test new functions only on development version of sites. But can you tell me css and js files, which your plugin load? I’ll exclude it from minification one by one and will test.

    BTW, when I open layer with a large image by clicking on a small, page still can be scrolled. As for me, it is not good for user expirience, and scrolling should be blocked while fancybox is opened. Do you have any option for this, which I didn’t find? If no, maybe you will be so kind to give advice, how to fix this by editing js/css? ??

    Hi, scrolling will be blocked in the next release. Until then, you can use custom CSS: html.fancybox-active body { overflow-y: hidden; }

    The files used by Easy FancyBox are:
    – /wp-content/plugins/easy-fancybox/css/jquery.fancybox.min.css
    – /wp-content/plugins/easy-fancybox/js/jquery.fancybox.min.js

    And depending on your settings:
    – /wp-content/plugins/easy-fancybox/js/jquery.easing.min.js
    – /wp-content/plugins/easy-fancybox/js/jquery.mousewheel.min.js
    – /wp-content/plugins/easy-fancybox/js/jquery.metadata.min.js (Pro extension only)

    Notice all files are already minified!

    Be aware: the issue is probably caused by another (plugin or theme) minified script file that comes before it. When a blocking error occurs, the rest of the script(s) that follow will not be executed. And because the FancyBox script files are by default loaded as late as possible, they are most likely to fall victim to earlier embedded script errors.

    To prevent this, you can modify the Easy FancyBox script priority setting under Theme/Plugin Compatibility settings on Settings > Media. Set the value to a low setting like 1 to move the script files up in embed order. Then let W3TC re-minify all…

    If that does not help, there is an option to move the script files to the header. Then re-minify and test again ??

    Thread Starter Roman

    (@vladroman)

    Thank you for explaining. Yes, I’ve already tested script priority option and moving to header (just for test, this variant is very bad for SEO). No effect. Looks like W3TC with my settings destroy something in your js/css. I’ll give you to know, if have any useful info.

    scrolling will be blocked in the next release.

    Great!

    BTW, when I open fancybox on Firefox 1920+ screen, I see small vertical line near closing cross. Not for all images, but for many. Smaller screen is ok, Chrome is ok any screen size (or I didn’t find). Something with css, probably. Here is screenshot: https://prnt.sc/115xzco

    Ok, maybe I have not tested W3TC enough… can you send me a screenshot of your JS minification settings?

    Thanks for reporting the Firefox issue ??

    Thread Starter Roman

    (@vladroman)

    Minify module (main settings page) – everything default; method: disk.

    Minify main – rewrite URL on.

    HTML – everything on.

    CSS – everything on; minify method: both; @import handling: process.

    JS – everything on except line break deleting; minify method: both; inserting type both: non-blocking using JS.

    Ah, yes. When using non-blocking mode, the needed jQuery library will not be ready in time when the inline FancyBox script is executed. This is an issue that will affect many other plugins that use javascript, specially when dependent on larger script libraries like jQuery…

    Best to either set this to Default (blocking) or try also excluding the jQuery library files:
    – /wp-includes/js/jquery/jquery.min.js
    – /wp-includes/js/jquery/jquery-migrate.min.js

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Compatibility with W3 Total Cache’ is closed to new replies.