• Hello,

    nice plugin, but whenever a page is cached (W3 total cache) the plugin does not work at all. I know about “minify” and stuff, but am I doing wrong? Even after putting all JS and CSS manually to the minify-options it is not working at all. Images are just openend in a new tab without lightbox.

    Solutions?

    Regards

    https://wordpress.org/plugins/foobox-image-lightbox/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I guess that a JavaScript inline comment is causing this error. W3 Total Cache (and other tools to minify the source code) removes all line breaks which results in one big “disabled” JavaScript call.

    You might try to directly edit the source code of the FooBox plugin to solve this issue, however each update of the plugin will reverse this fix!

    Open “foobox-image-lightbox/includes/class-script-generator.php” and goto line 172. Replace
    $preload = ' //preload the foobox font
    with
    $preload = ' /*preload the foobox font*/

    Hope that helps.
    Kind regards,
    demon_firefox

    Thread Starter mdidesign

    (@mdidesign)

    Thanks for your answer! Would be so sweet if the authors would fix it with an update – but they do not response at all :-/

    Thread Starter mdidesign

    (@mdidesign)

    PS: Unfortunately your solution does not work. Even after replacing this code the lightbox does not show up when clicking on a picture. The picture itself just opens in a new tab. Without cache it works, but with W3 total cache: No.

    What else may I do?

    Thread Starter mdidesign

    (@mdidesign)

    I now also changed every “//” to “/*” and at the end “*/”. But it does not work either… I don´t know why this plugin does not work when cached.

    Would you mind sharing the link to your website? 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not working with W3 total cache’ is closed to new replies.