The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[Plugin: WordPress Popular Posts] Compatibility with W3 Total Cache? (7 posts)

  1. success2be
    Posted 6 years ago #

    Since I migrated to W3 Total Cache with javascript minification, the popular posts plugin had not registered any new visits to my posts (over a week). What javascript file does popular posts use so I can make sure it's not part of the minification process?


  2. Héctor Cabrera
    Posted 6 years ago #

    Hi there,

    Unfortunately, WordPress Popular Posts does not use any external javascript, actually it just prints out a javascript function that handles the updating process into your theme's head.

    If this minification feature removes or alters this script, then my plugin can't work as it is required to cache your popular posts.

    Can't do anything for the moment to help you out with it since this is an issue caused by another plugin. However, once I get some spare time I'll check this plugin and see if there's a workaround to prevent it from colliding with mine. Can't guarantee anything, though.

  3. success2be
    Posted 6 years ago #

    I've unchecked "Comment removal" & "Line break removal" from the "JS minify settings" panel of W3 Total Cache and looks like its fixed.

  4. Héctor Cabrera
    Posted 6 years ago #

    Wonderful, thanks for reporting this. This info will help me and the developer of W3 Total Cache to figure out what might be messing with my plugin's javascript.

    Again, thank you!


    Just sent out an email to W3 Total Cache developers and hopefully they'll help us figure out what's going on:


    I'm the developer behind the WordPress Popular Posts plugin. One of my users recently reported that the JS Minification feature of your W3 Total Cache plugin for WordPress was preventing my plugin to work.

    Apparently, when the options "Comment removal" and "Line break removal" are checked, it somehow messes with the javascript that is printed out by my plugin directly on theme's header, hence preventing my plugin from caching posts views. If unchecked, everything works as expected.

    Here you can find the reported issue: wordpress(dot)org/support/topic/410649. Hopefully, you might help me and the users of my plugin find out what might be causing it so our plugins can work together.

    Thanks in advance for your time,

    Héctor Cabrera

  5. Digbick
    Posted 6 years ago #

    Any update on this one?

  6. Héctor Cabrera
    Posted 6 years ago #

    Hi there,

    I'm currently working on a newer version of WPP that should solve this problem. There's no ETA for this, though. Will post back once I get a fully working version so you can try it out for me.

  7. edwardnh
    Posted 5 years ago #

    I was having this issue just yesterday and did a bit of de-bugging. Here's what I found:

    I had already made some alterations to the wordpress-popular-posts.php file, namely inserting at the top of the file before the first line:

    define('DONOTCACHEPAGE', true);
    define('DONOTCACHEDB', true);
    define('DONOTCACHCEOBJECT', true);

    I haven't run it in this mode with all of the minification features intact but I think it might work. I did get rid of the comment and line break settings in W3 as success2be suggested. Running it in that mode after clearing the cache did nothing for me.

    I also did a few other minor tweaks, so I can't say definitively that I have isolated the problem.

    Two things did work though:

    1. Running minify entirely without the javascript minification.
    2. Running JS minify without the jquery file minified (/wp-includes/js/jquery/jquery.js.gzip)

    What I imagine is happening is that WPP depends on jquery in some way and that minifying it breaks the counter function. I suspect you can minify everything exactly as you want and leave out jquery and all would be well (I'm no coder so take this with a pinch of salt).

    That's my two cents: jquery is causing the conflict.

Topic Closed

This topic has been closed to new replies.

About this Topic