WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] Public caching of admin bar! (17 posts)

  1. arcUser678
    Member
    Posted 3 years ago #

    This is a serious one - but I can't seem to reproduce it now.
    I'm hoping that someone out there can help figure it out...

    It appears that W3 total cache (0.9.1.3) cached the admin bar of my wp account on the live version of a page - in a wp 3.1.2 site. I was on a private development server so it never got out to the world - but it freaked me out. I was going to upgrade a rather large multisite install from wp 3.0.5 to 3.1.2 in the next week... but now I don't think so... It's not an alternative to use another caching plugin right now.

    I was the only one using the site or editing that page at time. It appears w3 total cache assumed the admin bar was actually part of the page... But I can't seem to reproduce the results now... FYI - There aren't any caching servers, load balancers, CDN's, etc... - it's just a single server running.

    The rough sequence of events was:

    • I had been editing a page, made some updates, then left that page open for a while.
    • There was an autosave about 1-2 minutes after my last edit.
    • Then I go to look at the page in another browser and my admin bar shows up on the page
    • Then I tried an entirely different machine - a Mac running firefox - which I hadn't ever logged into WP on.
    • I tried logging out and back in more than 10 times, same thing.
    • Updating the page content was the only thing that cleared the problem out...
    • I was very surprised - and I didn't check to see if the admin functions actually worked, and it was only for the one page I'd been editing.

    I've tried rolling back the page (it was the page type - not a a post) to that revision to see if it was still there - but it's not...

  2. kmarizo
    Member
    Posted 3 years ago #

    Wow ! I thought I was going crazy, same thing has been happening to me.

  3. arcUser678
    Member
    Posted 3 years ago #

    Update to my own post - here's how I can reproduce the error every time (0.9.1.3). I just updated to (0.9.2.1) and this appears to have been corrected.

    • Clear the cache your pages/posts, or the entire cache of a site.
    • Visit the page/post(s) that had the cache cleared in a browser that you're also logged into the site with.
    • Now visit the page in a browser that isn't logged into the site.
    • You'll see that your page has the admin bar cached for public view - though thankfully none of the links work unless you're logged in.
  4. kw2
    Member
    Posted 3 years ago #

    You should check
    "don't cache pages for logged users"
    in the page chache settings.
    (or rebuild the cache)
    But you should open another browser to check your website then.
    (You won't see it minified).

    I had problems that the cache was rebuild while I was logged in.
    Nobody could write a comment, because the cached pages showed me logged in to anybody else.

  5. mistercyril
    Member
    Posted 3 years ago #

    What about if you have a web site entirely used by logged in users?

    Does that exclude the possibility of using a caching system?

  6. Frederick Townes
    Member
    Posted 2 years ago #

    Please confirm that the latest release is also fine.

  7. arcUser678
    Member
    Posted 2 years ago #

    It works fine with 0.9.2.2, I'll update to 0.9.2.3 in the next week and retest.

  8. brocheafoin
    Member
    Posted 2 years ago #

    I'm using 0.9.2.3 and witnessed the behavior mentioned in the original post. Here's how to reproduce. In a testing environment, where nobody does any page requests except you:

    1. Enable page cache, obviously
    2. In the advanced page cache settings, uncheck "Don't cache pages for logged in users".
    3. Empty the page cache
    4. Make sure the Admin Bar is active on public pages (in your profile settings)
    5. Load any public page in the same browser where you performed the settings (you are logged in, so the Admin Bar should be visible)
    6. Open a new browser or log out of the WordPress admin
    7. Load the same pages you loaded in step 5. You should see the Admin Bar (your admin bar) even if you're logged out.

    I'm not sure there is an easy way to fix this. If "Don't cache pages for logged in users" is checked, you'd want to not generate the cached page when it's first accessed by a logged in user. Yet you'd want logged in users to still see the Admin Bar (their Admin Bar) when they hit a cached page. My feeling is that the "Don't cache pages for logged in users" setting should be removed until there's a better way to handle this particular case.

  9. brocheafoin
    Member
    Posted 2 years ago #

    Erratum in my last paragraph. The second sentence should start like this:

    If "Don't cache pages for logged in users" is unchecked

    My suggestion is that for the time being, logged in user never see cached pages, and that the option to change this behavior is removed.

  10. wdwgolfer
    Member
    Posted 2 years ago #

    Hi all,

    I can confirm that this issue is still present in Version 0.9.2.4. In fact, I had a person send me a message yesterday on Google+ to let me know that when he went to my site, using a link from a blog post I had replied to on another site, he was able to see the WP Bar on my home page. He even sent me a screen capture of my home page in his browser to show me that the WP Bar was present and showed my name and gravatar, etc.

    From what I can tell, if my experience is consistent, using the WP Bar when not logged in when this happens, does not allow you to get into the site Admin pages. It takes me to the WP login page.

    So the appearance of the WP Bar when not logged in may be a bit of a red herring, albeit a scary one.

    I agree with others that caching should not take place at all for logged in users and any settings relevant to this behavior be removed.

    Thanks.

  11. Tubal
    Member
    Posted 2 years ago #

    I have the same issue on Wp 3.2.1.
    Simple workaround: Disable the Admin Bar. This way the admin bar will never show up even you're logged in and thus, it will not get cached.

    All you have to do is include this tiny snippet in your functions.php file:

    // REMOVE FRONT-END ADMIN BAR (wp 3.1+)
    // http://codex.wordpress.org/Function_Reference/show_admin_bar
    if (function_exists('show_admin_bar')) {
    	show_admin_bar( false );
    }

    Hope that helps!!

  12. Frederick Townes
    Member
    Posted 2 years ago #

    Everyone is not caching pages for logged in users right?

  13. mjobran
    Member
    Posted 2 years ago #

    I have the same problem with the latest release with "do not cache for logged in users" un-checked.

    Anyways, the plugin isn't caching if I check that option and I couldn't find a solution for this bug although i paid $100 to your company but you guys did not help in this matter.

    Please help

  14. MacMacken
    Member
    Posted 2 years ago #

    Same problem here (and without caching for logged-in users, of course).

  15. fdant
    Member
    Posted 2 years ago #

    It happened to me too, and the problem was the browser cache. Clean your browser cache and see if the admin bar disappear.

  16. Frederick Townes
    Member
    Posted 2 years ago #

    Anyone agree with @fdant?

  17. arcUser678
    Member
    Posted 2 years ago #

    It seems likely that it's a browser cache issue. I haven't noticed a problem in the last 8 months. As well - I always check my updates in a different browser than what I edit in - and usually just after I clear the cache.

Topic Closed

This topic has been closed to new replies.

About this Topic