Solutions to W3 Total Cache + FaceBook Share Conflict
September 5th, 2010
While working on a client site which used both the W3 Total Cache plugin as well as the Facebook Share plugin, I came across a bug where the Facebook Share icon that was to be placed at the top and bottom of each blog post was disappearing, only to be replaced by a “Share” link that linked to nowhere.
After playing around with the Facebook Share settings for quite some time, I started deactivating plugins one by one to see if there was a conflict causing this. I noticed that the culprit was the W3 Total Cache plugin, which was crucial to the stability of this highly trafficked web site and could not be deactivated nor replaced, as it really is the best plugin for WordPress caching.
Solution #1:
I was able to fix the issue by changing a single W3 Total Cache setting. By going in my admin to Performance > Minify, I scrolled down to the JavaScript settings, unchecked the “Enable” checkbox and clicked “Save changes.” I was also able to leave the global Minify setting for the plugin (found by navigation to Performance > General Settings) enabled for CSS minification.
Voila! My Facebook Share icon was now appearing on the site again and functioning properly.
It is my feeling that the Facebook Share plugin is not the only plugin out there being impacted by W3 Total Cache’s minify settings. I would venture to guess that there a good number of other JavaScript-based plugins that could be broken by JS magnification, so keep this in mind for future plugin bugs and conflicts.
Solution #2:
On my own site, I am running W3 Total Cache with Minify enabled globally (to reduce the memory imprint of both CSS and JS code) while also running a Facebook Like button plugin with no problems.
The W3 Total Cache-compatible Facebook plugin that I’m running is simply titled “Like” and can be found at http://wordpress.org/extend/plugins/like.
Category : 2-Minute Tips & Blog & WordPress




Tweets that mention Solutions to W3 Total Cache + FaceBook Share Conflict -- Topsy.com
1 year ago
[...] This post was mentioned on Twitter by Yael K. Miller, Doron Orenstein. Doron Orenstein said: New on my blog: Solutions to W3 Total Cache + FaceBook Share Conflict http://bit.ly/8XoYLj #WordPress [...]
Yael K. Miller
1 year ago
I use W3 Total Cache on our site and a Facebook Like plugin but I haven’t add any problems with it. The plugin I use is WP Facebook Like This: http://wordpress.org/extend/plugins/wp-facebook-like-this/ (It does work with WP 3.0.1)
I don’t use its automatic include function but rather drop its function into my custom_functions.php file. I also use XFBML rather than iFrame.
Sometimes, it takes a few minutes to kick in the first time you activate it. So just go to a different page and refresh a couple times.
Doron
1 year ago
Wow, that’s a cool technique! It seems like this particular conflict seems to be specific to the Facebook Share plugin, so the easiest route is probably to just use a different plugin so that you can utilize the benefits of W3 Total Cache’s JavaScript minification.