Jetpack by WordPress.com
Twitter button image missing using W3TC minify (7 posts)

  1. mikeotgaar
    Posted 3 years ago #

    I recently switched the caching system for one of my sites to W3TC Cache, and found the twitter icon missing (icon image only and icon with text) - also 404 errors logged for the image URL.
    The other icons were present. (Logged in and logged out)

    WP versions 3.4.1 and 3.4.2
    Jetpack v 1.7
    Browsers: Firefox and Chrome browsers
    W3TC Minify settings for CSS - Enable, @import handling - Process

    Fixed by changing code in jetpack/modules/sharedaddy/sharing.css from

    li.share-twitter a.sd-button > span {
    	background-image: url('images/twitter.png?1');


    li.share-twitter a.sd-button > span {
    	background-image: url('images/twitter.png');

    I wonder if the inclusion of the ?1 after twitter.png was an error in the code - none of the other icon URLs have it...

    Anyway, it's fixed for me - just to let anyone with a similar problem know. This solution may also help with another bug report - Twitter button not displaying - Safari 5.1.5 for Mac browser - will post link to this submission there. I posted separately as it seemed like a different situation.


  2. mikeotgaar
    Posted 3 years ago #

    Same problem exists with latest version of Jetpack - 1.8.1

  3. Tim Moore
    Plugin Contributor

    Posted 3 years ago #

    At this time, we don't recommend using Jetpack with W3 Total Cache's minify setting turned on. There are a number of issues being caused by the minify setting.

    Thanks for the reports!

  4. mikeotgaar
    Posted 3 years ago #

    @Tim Moore
    Thanks Tim for that note...
    Apart from the small thing mentioned - which is easy enough to mod, I'm happy with it as it is -
    The modules used are working, but I'm not using all modules

    FYI, heres a list (may make your de-bugging easier)
    WordPress.com Stats
    Spelling and Grammar
    Gravatar Hovercards
    Enhanced Distribution
    Shortcode Embeds

  5. Frederick Townes
    Posted 2 years ago #

    @Tim, what can I do to improve compatibility with minify?

  6. officeninjas
    Posted 2 years ago #

    @Frederick, One specific issue I have, which is forcing me to turn off w3TC is gravatar support.

    In plugins/jetpack/modules/gravatar-hovercards.php function grofiles_attach_cards() script handle 'wpgroho' is used to enqueue wpgroho.js and a few lines down used to set some values using this function call: wp_localize_script('wpgroho', 'WPGroHo', compact('my_hash'));

    When JS Minify is turned on, the wpgroho.js file is concatenated and minified correctly, but put in the header while the result js from wp_localize_script is placed right before </body>. So the settings are not visible to wpgroho.js and causes an error:

    Uncaught ReferenceError: WPGroHo is not defined

    When JS Minify is turned off, the wpgroho.js file and wp_localize_script js are both placed right before </body>, but wpgroho.js is second so that the settings are visible to it.

    A year ago, you mentioned that this will be addressed in the next release, (http://wordpress.org/support/topic/plugin-w3-total-cache-javascript-auto-minify-wp_localize_script?replies=8) but couldn't find a followup support ticket or mention of a fix to this issue in any of the latest W3TC releases.

    I'm using:
    Wordpress Version 3.5.1
    Jetpack Version 2.2.5
    W3TC Version

  7. Frederick Townes
    Posted 2 years ago #

    Ok will revisit that localization issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic