Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Sarah

    (@shen045)

    I’ve had a look at this and it was a bug in matching the share counts up with the correct counters (it was originally designed to use the page/post ID, but that doesn’t work for the share-page-buttons since they work only on the page URL).

    This will be fixed in the next release (version 1.3.1) which should be up later today.

    Cheers,
    Sarah

    Thread Starter talkbasket

    (@talkbasket)

    Thank you for a quick response Sarah. We have updated the plugin to the latest version but have the same issue.

    Here’s another example:

    http://www.talkbasket.net/9707-turkey-win-u20-european-championships-in-crete.html

    http://www.sharedcount.com/#url=http%3A%2F%2Fwww.talkbasket.net%2F9707-turkey-win-u20-european-championships-in-crete.html

    We’ve also tried this code but got same result:

    <?php do_action('crafty-social-share-buttons'); ?>

    Plugin Author Sarah

    (@shen045)

    I think in your case, you should be using
    <?php do_action('crafty-social-share-buttons'); ?>

    This one is designed to work with posts and pages within the loop. The other one (crafty-social-share-page-buttons) is only for situations like archive pages where you want to share the archive page itself.

    However, I think in your case, the problem is different. Do you have any security plugins enabled? It seems that something is blocking the ajax calls that are used to populate the share counts, so they are never being updated.

    Thread Starter talkbasket

    (@talkbasket)

    Thanks for your patience Sarah 🙂

    We changed the code to <?php do_action('crafty-social-share-buttons'); ?> as you suggested.

    Since you mentioned ajax, we use WP-Polls plugin which uses ajax – http://wordpress.org/plugins/wp-polls/

    Other plugins installed on the site – Disquss comment system, Getty Images, Google XML Sitemaps, inScore (used to display livescore on a single page http://www.talkbasket.net/livescores ), SF Author Url Control, WordPress Menufication.

    The theme that we use had default Facebook like, tweet and Google+ buttons with counters placed in the same spot (here’s an example http://www.mvpthemes.com/hottopix/latest-iphone-5s-rumor-pegs-camera-at-12-megapixels/ ). We will try to switch back to original buttons to see if they are working or not.

    Plugin Author Sarah

    (@shen045)

    I’m not sure exactly the root cause yet, but if you have a look at the network requests when loading the page (e.g. using the Network tab of Chrome Developer tools), you’ll see that the requests to wp-ajax.php are getting a 406 Not Acceptable response. That’s probably coming from the web server itself, rather than WordPress.

    My best guess at this point is that something like mod_security in the webserver is blocking the request, likely because it contains a URL.
    Could you check your server logs and see if there is anything in there about why the request is being rejected?

    It might be possible to whitelist these particular requests in your server configuration. If this is the problem (I want to make sure), then I can probably change things so that it doesn’t need the URL for the ordinary share buttons. I don’t think I’d be able to make the share-page-buttons work without being able to pass the URL though.

    Thread Starter talkbasket

    (@talkbasket)

    It was indeed a mod_security issue. Solution 1 here http://www.tipsandtricks-hq.com/apache-mod-security-update-how-to-fix-error-406-or-not-acceptable-issue-259 solved the issue. Now counters work fine. Thanks for your help!

    You mentioned that it might be possible to whitelist particular requests. Would it be possible to do it by modifying this code in some way?

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    And one more, rather cosmetic, question. Is it possible not to show counters until numbers are loaded? Right now zeros are displayed until counters are fully loaded.

    Hi Sarah, thanks for your work on solving the issue, appreciated. However, I did the update today and suddenly they both show 0 on all my posts! Do you know why this happened? I tested this in Chrome and Safari and did hard refreshes, they all show 0 count all across now. Thanks for your help!!! Jim

    Plugin Author Sarah

    (@shen045)

    OK, good to have that confirmed. I wouldn’t recommend disabling mod_security as a permanent fix, so I intend to have a new version up in the next couple of days which should work for the ordinary share buttons even with mod_security turned on. (It won’t work for the share-page-buttons, but those are only used in a few specific circumstances and not by the majority of users of this plugin).

    And yes, in the same release I intend to have some different options for the initial display of the counts before they load, other than just zeros.

    Plugin Author Sarah

    (@shen045)

    Jim – can you give me your site URL so I can see what the issue might be?

    Hi Sarah,

    Here is a post which featured many likes right before the update and boom 0 after the update. http://www.immodating.ch/pro/blog/fond-immobilier-procimmo-gerance/

    I just emptied all cash with the W3 Total Cache module and still not working.

    Thanks for your help.
    Jim

    Not sure how come but boom suddenly it works! Did you do anything Sarah? Maybe there was some latency with the cache refresh, it’s very strange and I am sorry for disturbing you. Glad it works at least! Thanks for your quick reaction. Jim

    Plugin Author Sarah

    (@shen045)

    I wish I could take credit for it working again, but I didn’t do anything 🙂
    It could have just been a caching issue, but glad it is working again!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Counters display zeros’ is closed to new replies.