Wow ! I thought I was going crazy, same thing has been happening to me.
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.
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.
What about if you have a web site entirely used by logged in users?
Does that exclude the possibility of using a caching system?
Please confirm that the latest release is also fine.
It works fine with 0.9.2.2, I’ll update to 0.9.2.3 in the next week and retest.
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:
- Enable page cache, obviously
- In the advanced page cache settings, uncheck “Don’t cache pages for logged in users”.
- Empty the page cache
- Make sure the Admin Bar is active on public pages (in your profile settings)
- Load any public page in the same browser where you performed the settings (you are logged in, so the Admin Bar should be visible)
- Open a new browser or log out of the WordPress admin
- 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.
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.
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.
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!!
Everyone is not caching pages for logged in users right?
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
Same problem here (and without caching for logged-in users, of course).
It happened to me too, and the problem was the browser cache. Clean your browser cache and see if the admin bar disappear.
Anyone agree with @fdant?