• I activated W3Total Cache today on a production site, and immediately was made aware by my client that the Admin Bar was showing up for all visitors to the website with my name displayed in the title.

    After a process of elimination, determining if it was Cloudflare or W3 Total Cache, we determined it was Total Cache.

    The admin-bar only gets cached for non-authenticated users if W3 Total Cache is enabled, regardless of the caching/minify settings in Cloudflare.

    Has anyone else seen this recently? We like W3 Total cache, because it actually minifies the HTML, unlike cloudflare, but we can’t have the admin bar being cached. Hiding the admin bar for logged in users is not an option either.

    Suggestions?

    https://ww.wp.xz.cn/plugins/w3-total-cache/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you using BuddyPress

    Thread Starter apparentmedia

    (@apparentmedia)

    Hi Destac, we are not using BuddyPress.

    The other major plugins used are

    • Timber
    • Rev Slider
    • Event Espresso
    • Advanced Custom Fields

    1. Try disabling all of your plugins to see if it resolves the problem or switching back to the default theme.

    If all else fails you could add this to your header.php above the </head> code.

    <?php if ( !is_user_logged_in() ){ ?>
    <style>
    #wpadminbar{ display:none; }
    </style>
    <?php } ?>

    Thread Starter apparentmedia

    (@apparentmedia)

    Destac, disabling the admin bar is not acceptable for this installation. The users use the admin bar to engage in front end editing/management.

    Are there any known conflicts where the admin bar gets cached,based on the plugins listed above?

    This isn’t a w3tc issue. This is an issue with your site and either a plugin or some custom code. The Wp-Admin bar does not load for non-logged in users by default. If it is then it’s not because of W3.

    Thread Starter apparentmedia

    (@apparentmedia)

    It isn’t showing the admin bar to non-logged in users, it is caching an admin’s bar for non-logged in users.

    As in, everyone who visits the site, see’s the admin bar with “Howdy, Admin” or “Howdy, Jessica”, or whatever in it. Its showing the admin bar, cached by the first person to visit a page after the cache is built.

    I’d happily clone a copy of my site for debugging purposes, if someone wants to poke around and see why this is happening. I don’t know enough about the W3TC’s inner workings to understand where this could be occuring.

    Please clone it.

    HI,

    I’m having exactly the same issue and it is caused by W3.
    There are several threads in this forum describing the same. So far no solution offered.
    This is major security flaw where admin username is shown to the whole world.

    “The Wp-Admin bar does not load for non-logged in users by default. If it is then it’s not because of W3.” – it does do it for NON-logged in users, only when W3 is enabled.

    Any suggestion?
    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Admin bar Caching for unauthenticated users’ is closed to new replies.