W3 Total Cache Minification of JQuery Breaks LightBox

I’m running into a conflict issue – different theme. It looks like the images are coming through, but the back and previous doesn’t work when I’m out of the dashboard. My guess was a js block, but I’ve selected the move to footer option which hasn’t cleared things either. Suggestions?

Page – http://www.bluerosedesignpdx.com/web-design-portfolio-page-4

Shortcode – slickr-flickr tag=”web-archive” items=”14″ type=”gallery”

Russell:

You are using a caching plugin that is crunching all the Javascript together into a single file.

Unfortunately when this happens, jQuery becomes undefined. See image.

Screenshot of JavaScript Showing jQuery is undefined

Given you are crunching JS anyway, my suggestion is that you do not use the jQuery from Google (https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js?ver=3.1.2) but instead use WordPress’s own version of jQuery. Google jQuery redeclares jQuery as “window” and the crunching exercise is losing its alternative names of “jQuery” and “$” (these names work fine when uncrunched)

Debbie:
Can you give me a little more detail where to make this change? I am running W3 Total Cache ( not an expert at it ), but I can’t see where to make the change. Is it within that plugin, or somewhere else?

Russell:
I do not use W3 Total Cache so am not familiar with it either.

First thing to do is to temporarily disable W3 Total Cache just to verify if that it is the problem. If the problem goes away that you know W3 Total Cache’s handling of jQuery is the issue.

Then re-enable W3 Total Cache, read the following and remove jquery.js from the ‘minification’.

I just updated to version 1.43 of the plugin, and seem to be encountering a similar issue. I had no issues with the previous versions, but after the update I have no “previous” or “next” functionality in the slideshow. I have deactivated W3 Total Cache and tested, with no improvement.

Once I unchecked the “enable” JS minify settings, of the W3 Total Cache plugin, the previous and next works! On another note this change also fixes SimpleViewer. Just in case someone else is running that plugin.