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.

W3 Total Cache
[resolved] W3TC minification fails every 3-5 days (22 posts)

  1. cmegown
    Posted 4 years ago #

    Check us out: http://www.zywave.com

    We're running W3TC and a responsive drop-down menu plugin called UberMenu. Every 3-5 days, the menu fails and displays as a simple list void of any styling - which is obviously not good. We've tried turning off minification in a number of different ways and combinations, and this morning, we just turned off minification completely.

    We'll be monitoring the site to see if this at least solves the problem for now, but some feedback and support here would be incredibly valuable - even if it's not from one of the developers! We're pretty much out of ideas here.

    Feel free to post questions and I'll do my best to answer what I can.



  2. bishope
    Posted 4 years ago #

    I was able to reproduce this by browsing certain pages on your site. Your homepage appears fine, it's the secondary pages that appear to have the issues. Specifically, your broker briefcase page shows the nav css issues every time I load it. http://www.zywave.com/insurance-services/broker-briefcase/ and yet your training and support page always loads fine: http://www.zywave.com/about-us/training-support/

    Your index page also never appears to have an issue. I would disable W3 cache completely and see if the pages above work.

    I also tested this in multiple browsers and was able to reproduce the nav css issues on each of those pages identified above.


  3. cmegown
    Posted 4 years ago #

    @bishope thanks for your input, and you're correct, that is the exact issue we're having. We have minification turned off completely, but we somehow seem to be losing the styling for the nav menu...on different pages at random (which makes no sense to me). If it makes any difference to anyone, the styling for the nav menu come from a custom.css file within the plugin, which is what I would assume is being left out on the broken pages for some reason.

    I think I will look into disabling W3 Total Cache and finding a good time of day to implement WP Super Cache. Some test runs showed that plugin working MUCH better.

    I would still love more and more feedback :)

  4. cmegown
    Posted 4 years ago #

    Update: We just now noticed that this is most likely caused by random pages being loaded in HTTPS for an unknown reason. Because of this, various stylesheets are being loaded via HTTPS, which basically means it isn't getting loaded.

    Does anyone know of a reason pages seem to randomly load in HTTPS? It's not always the same page(s), and there isn't a certain time that this happens - it just happens (seemingly) at random.

  5. bishope
    Posted 4 years ago #

    Not sure on the random https thing unless you have a plugin that is somehow forcing a redirect...that's unusual for a page to switch protocols like that...I have noticed that I can't reproduce the broken styles anymore...all appears to be loading fine for me. Did you fix the issue? Was it WP Super Cache?

    I use it too, so if that is the culprit, it will save me some headaches down the road! :)

  6. cmegown
    Posted 4 years ago #

    I do use a redirect plugin to bring visitors who might have bookmarked our old non-WordPress URLs to the new site, but that shouldn't be causing the problem I wouldn't think.

    One thing I'm going to change tonight is to move all the menu styling in that custom.css file into the theme's main style.css to see if that fixes it. There was another issue with the menu styles breaking this morning, so we shall see what happens.

    This is getting old very quickly.

  7. darkhorse20
    Posted 3 years ago #

    Any update on this? I'm having the exact same issue with the UberMenu and W3TC plugins. Every few days the UberMenu CSS vanishes from the menu bar, it's pretty darn annoying.

  8. cmegown
    Posted 3 years ago #

    What I ended up doing was two things:

    1) Take menu css that I had in UberMenu's custom.css and move it to my global style.css
    2) Dump W3 Total Cache and run WP Super Cache.

    So far, no problems and my site runs 100x faster than before.

    Hope this helps.

  9. TechHamlet
    Posted 3 years ago #

    You sure super cache is better? Have any proof?

  10. fatsroberts
    Posted 3 years ago #

    FYI, after experience the same problems with the rendering of UberMenu using both W3 Total Cache and Super Cache I finally decided to just see if there were any problems with UberMenu (since this is the only thing affected by turning on caching).

    What do you know? They list right on the plugin site (http://wpmegamenu.com/) a list of caveats, including it's incompatibility with IE 6. So, knowing that these caching tools are merely capturing how a client renders the site and saves it for the next visitor (until it expires), I checked my site in IE6. Sure enough, it looks like the same garbage as some of these fluky pages that have been cached.

    I'm pretty sure the problem is with UberMenu's incompatibility with IE6. If you turn caching on, you are risking caching the mega menu the way IE6 sees it (why are people still using IE6, idk).

    So, for now, I'm trying to figure out what would be easier:
    1. replace ubermenu with something IE6 compliant
    2. find a way to exclude IE6 from caching server-side

    Feel free to correct me if I've made any mistakes.

  11. darkhorse20
    Posted 3 years ago #


    The issue with UberMenu and W3Total Cache was being seen in browsers such as Firefox, Chrome and IE9. It is not an IE6 specific issue.

    Also, it has been a general consensus that IE6 should not be supported any more, unless you're developing specifically for China. Check out Microsoft's official death to IE6 website- http://www.ie6countdown.com/

    By the way, I've switched over to SuperCache and the issue has gone away. I also noticed the pages on the website load noticeably quicker than they did with W3Total Cache.

  12. fatsroberts
    Posted 3 years ago #

    Yes, I understand you see the problem in multiple browsers. I am experiencing the same thing. What I'm saying is people who are viewing your site with IE6 are the ones causing the problem, IMO. My theory is when they view your site, and the page is cached based on their session, so then everyone else visiting subsequently gets to see that awesome IE6 experience, as well.

    I'm glad super cache solved your problem, but UberMenu still started popping up unstyled on my site a week into switching. UberMenu in the cached versions of the pages I'm seeing in Chrome, FF, and IE 7+ look exactly like I'm visiting the site in IE6. To test my theory, I emptied my dev site cache, and then pounded it with IE6 (generating cached versions of the pages on the server). When I went back in a different browser, I saw the unstyled menu everywhere.

  13. fatsroberts
    Posted 3 years ago #

    Also, I'm not sure if anyone here has actually measured performance between W3 Total Cache and Super Cache (to TechHamlet's point), but based on tests I ran on webpagetest.org, W3 Total Cache is a better tool. I received measurably better marks using W3TC and I also prefer the plugin UI. Now that I believe the problem is with UberMenu, I plan to switch back, if possible.

  14. darkhorse20
    Posted 3 years ago #

    Here's some info from the UberMenu documentation about this:


    Caching Plugins

    Some users have reported issues with caching plugins such as W3TC (W3 Total Cache). The symptom is that the menu is intermittently displayed as an unstyled list on cached pages.

    I've investigated this issue, and the cause is that the caching program has not properly cached the menu markup - instead, it seems to revert to either the theme's markup, or some default markup for the menu, thereby resulting in the unstyled list of menu items.

    In other words, UberMenu is not being displayed at all. Codewise, UberMenu's display is a combination of two things: HTML and CSS. The CSS (stylesheets) are still loaded; however, the cached page does not display the UberMenu-generated HTML markup. As a result, there is nothing for the CSS to style (the elements which the CSS targets do not exist). The menu being displayed is not UberMenu at all, and that is the problem.

    To my knowledge, there is nothing UberMenu can do to change how W3TC chooses to cache the page. UberMenu follows all of the WordPress standards to create the menu markup (via filters and custom navigation walkers).

    Please note: I am not sure if this is an issue with the plugin itself, or with the way the plugin has been configured on a particular site.

    For help with caching issues, I recommend contacting the author of the caching plugin, as they will certainly have better insight into how the caching works. If there are any recommendations that will help the caching plugin be more compatible, I am certainly willing to consider them.

    For now, if you experience this issue, the recommended solution is to disable caching.

  15. Maraki
    Posted 3 years ago #

    I am facing exactly the same problem with WP-Supercache and ubermenu and becoming really frustrated. There is no solution so far for this.

    Could we not use the mfunc function to exclude ubermenu from being cached?

    Has anyone come up with a working solution?


  16. IntricatePixels
    Posted 3 years ago #

    Incredible. I spent a day trying to figure out why the header of my site gets all messed up randomly for some pages.

    I'm using W3 Total Cache and the Ubermenu plugin. Suspecting that Ubermenu was the culprit was the last thing in my mind. Did a lot of troubleshooting and what not.

    Then when I did a line by line compare of the source code of a "bad" file vs a good file served by total cache, I noticed that there is no difference at all.

    Then inspecting the header area I realized that the Ubermenu CSS isn't being loaded at all!!! Don't have a solution for now, but the long term solution is to drop Ubermenu and just write a function myself to populate the menus.

    Less plugins, less headaches ...

  17. darkhorse20
    Posted 3 years ago #

    I've been using WP Super Cache and Ubermenu successfully together without any issues using this in my code:

    <!-- mfunc wp_nav_menu(); --> <?php wp_nav_menu(); ?><!-- /mfunc -->

    This is mentioned in an updated: http://wpmegamenu.com/help/#faqs

    Potential Solution

    One potential solution is to use the caching plugin mfunc functionality. For example, in WP-Super Cache this may help (different plugins may use different syntax, check your caching plugin's documentation for details on "dynamic caching")

  18. IntricatePixels
    Posted 3 years ago #

    Thanks @darkhorse20, your feedback on this thread is very helpful.

    I was incorrect in my previous reply. Did another line by line compare of the source code of a "bad" and "good" page and indeed for the "bad" pages, the cache is not generating the Ubermenu specific html markup, hence the crappy looking menu.

    What I don't understand (and haven't had time to investigate), is why aren't the cache plugins not catching the Ubermenu html markup and caching that, but caching the default WP menu markup instead? Is it because that particular page was loaded in an incompatible browser (i.e. IE6 or IE7) where Ubermenu doesn't load at all? Or is it related to how Ubermenu is implemented (therefore cache being created before Ubermenu has been initialized in some cases)?

    The mfunc solution looks legit and I will try that, but my end goal is to remove Ubermenu completely and write my own clean markup instead.

  19. cschneider271
    Posted 3 years ago #

    Hello all,
    It looks like he released an update for this plugin. Go ahead and head over to Code Canyon and grab the updated version. He also has a new docs website regarding this:

    This specific article may help:

    It looks like he has a new function that you can drop in (replacing the current call to the wp_menu)
    <?php uberMenu_direct( 'primary' ); ?>

    Keep in mind you have to use the updated plugin to use that function. I am still working through getting the styles ported over locally before moving it to a development environment.

  20. cschneider271
    Posted 3 years ago #

    Just to update,

    I was able to get this in place and working. So far so good!

  21. IntricatePixels
    Posted 3 years ago #

    Good stuff, thanks for sharing.

  22. Need4WPspeed
    Posted 3 years ago #

    Hi all,
    I am currently using:
    uberMenu_easyIntegrate(); ?>
    to integrate Ubermenu, so should:
    <?php uberMenu_direct( 'primary' ); ?>
    replace this once updated to latest version? Thanks
    Incidentally my theme breaks every 3-5 days and minification is not even enabled!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic