• Resolved chromasia

    (@chromasia)


    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’;
    swp_post_id=’9064′;
    swp_post_url=’https://chromasia.com/buzludzha-2-2017/’;
    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 to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Hai Zheng⚡

    (@hailite)

    Noted. Will check the compatibility with Social Warfare plugin. Thanks for your feedback.

    Thread Starter chromasia

    (@chromasia)

    You’re welcome. Will you update here if you find anything?

    Plugin Support Hai Zheng⚡

    (@hailite)

    Yes we will.

    Thread Starter chromasia

    (@chromasia)

    Excellent. Thanks.

    Thread Starter chromasia

    (@chromasia)

    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

    (@chromasia)

    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

    (@lclarke)

    Hi, @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

    (@chromasia)

    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

    (@chromasia)

    I’ve done some further testing. Social Warfare works if you disable JS Minify and JS HTTP/2 Push.

    Plugin Support Hai Zheng⚡

    (@hailite)

    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

    (@chromasia)

    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⚡

    (@hailite)

    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

    If you meet any more issue, please create a new topic to let us know. Thanks.

    Thread Starter chromasia

    (@chromasia)

    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.