Title: Social Warfare plugin
Last modified: September 19, 2017

---

# Social Warfare plugin

 *  Resolved [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/)
 * I’ve run into a problem with the Social Warfare plugin as follows:
 * When I combine all my javascript files Social Warfare doesn’t seem to update 
   the social share counts. When I’ve checked the web inspector in reports the following(
   I’ve replaced the angle brackets with square brackets):
 * [script type=”text/javascript”] swpPinIt={“enabled”:false};var swpClickTracking
   = false; var swp_nonce = “ff96d25db7″;
    var swp_buttons_exist = !!document.getElementsByClassName(‘
   nc_socialPanel’ ); if ( swp_buttons_exist ) { swp_admin_ajax = ‘[https://chromasia.com/wp/wp-admin/admin-ajax.php&#8217](https://chromasia.com/wp/wp-admin/admin-ajax.php&#8217);;
   swp_post_id=’9064′; swp_post_url=’[https://chromasia.com/buzludzha-2-2017/&#8217](https://chromasia.com/buzludzha-2-2017/&#8217);;
   swp_post_recovery_url = ”; socialWarfarePlugin.fetchShares(); } [/script]
 * The line “socialWarfarePlugin.fetchShares();” generates this error: “Can’t find
   variable: socialWarfarePlugin”
 * The net result is that Social Warfare doesn’t update the share counts unless 
   I disable JS Combine. I’ve also tried excluding Social Warfare from being combined,
   along with jquery and pretty much every other script I can find, but as long 
   as JS Combine is enabled the share counts don’t update. As soon as I turn off
   JS Combine everything goes back to normal.
 * I’m hoping you can fix this as JS Combine makes a significant improvement to 
   my page speed scores but I just can’t get it to work with Social Warfare.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsocial-warfare-plugin%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Support [Hai Zheng⚡](https://wordpress.org/support/users/hailite/)
 * (@hailite)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9511061)
 * Noted. Will check the compatibility with Social Warfare plugin. Thanks for your
   feedback.
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9511066)
 * You’re welcome. Will you update here if you find anything?
 *  Plugin Support [Hai Zheng⚡](https://wordpress.org/support/users/hailite/)
 * (@hailite)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9511070)
 * Yes we will.
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9511073)
 * Excellent. Thanks.
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9511132)
 * I’ve done some further checking. The code I included above is generated when 
   Social Warfare is set to ‘Legacy Caching’. When set to ‘Advance Cache Triggering’
   no errors are generated but the share counts still fail to update.
 * Best wishes,
 * Dave
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9527832)
 * Hi there,
 * I wondered if you’d manage to identify if there’s a problem with the Social Warfare
   plugin and Litespeed? There’s no rush, it’s just that I’m still trying to troubleshoot
   this issue on my own site.
 * Best wishes,
 * Dave
 *  Plugin Support [LiteSpeed Lisa](https://wordpress.org/support/users/lclarke/)
 * (@lclarke)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9540046)
 * Hi, [@chromasia](https://wordpress.org/support/users/chromasia/)
 * Afraid not. We haven’t had a chance to explore it yet, but it’s on the list! 
   Sorry for the wait. We’re putting the finishing touches on our next update.
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9540536)
 * Hi Lisa,
 * No problem, I’m just keen to get it resolved as in all other respects it’s working
   flawlessly. I’ll wait for your next update.
 * Best wishes,
 * Dave
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9543597)
 * I’ve done some further testing. Social Warfare works if you disable JS Minify
   and JS HTTP/2 Push.
 *  Plugin Support [Hai Zheng⚡](https://wordpress.org/support/users/hailite/)
 * (@hailite)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9546709)
 * I noticed you put `socialWarfarePlugin` into a jquery document ready wrapper,
   which should fix the issue. Am I right?
 * The socialWarfarePlugin’s lib script is in footer js. So what you have done is
   the ideal way to fix it.
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9546718)
 * That wasn’t anything I did, and I still don’t think it’s working properly with
   JS Minify, but it seems to be working OK at the moment.
 *  Plugin Support [Hai Zheng⚡](https://wordpress.org/support/users/hailite/)
 * (@hailite)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9546754)
 * However, there is a potential nonce bug once it gets cached. I created a pull
   request to the author’s repo:
 * [https://github.com/warfare-plugins/social-warfare/pull/421](https://github.com/warfare-plugins/social-warfare/pull/421)
 * If you meet any more issue, please create a new topic to let us know. Thanks.
 *  Thread Starter [chromasia](https://wordpress.org/support/users/chromasia/)
 * (@chromasia)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9546813)
 * Excellent. I can’t pretend I understand the last bit, but it definitely sounds
   like you’ve got the problem in hand.
 * Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Social Warfare plugin’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [chromasia](https://wordpress.org/support/users/chromasia/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/social-warfare-plugin/#post-9546813)
 * Status: resolved