So I am the only one who use this tool with active members or the only one who has this issue? I’m still having this issue any help would be highly appreciated Thank you!
Update: I use the debug feature and I got these results:
<!– W3 Total Cache: Page cache debug info:
Engine: disk: basic
Cache key: ********************************************
Caching: enabled
Status: not cached
Creation Time: 1.488s
Header info:
X-Powered-By: PHP/5.2.17
X-CF-Powered-By: WP 1.3.5
Set-Cookie: PHPSESSID=68302fb94dfe578d468f6108e590c17e; path=/
Last-Modified: Sat, 16 Jun 2012 16:06:24 GMT
Vary: Cookie
X-Pingback: ********************************************
Content-Type: text/html; charset=UTF-8
–>
Is this normal?
p.s. I replace ***** with my site info.
Guys you cannot imagine how many people has this issue, search it on Google… Just put this solution to your F.A.Q.
Solution:
Add this code to functions.php:
// Fix W3TC Logout Issue
add_action('wp_logout', 'mj_flush_w3tc_cache');
function mj_flush_w3tc_cache()
{
if (function_exists('w3tc_pgcache_flush')) {
w3tc_pgcache_flush();
}
}
Ciao Stergos,
I use wordpress with W3 total cache. I do the logout but I have a error message: “forbidden you do not have permission to access …”
I paste the code in your function.php but the web site breaks down.
Where do I paste the code exactly. Do you have a solution for me? Thank you.
Hi, I don’t use W3tc anymore but I solve this issue using the follow code into my login plugin.
define('DONOTCACHEPAGE', true);
define('DONOTMINIFY', true);
define('DONOTCACHEOBJECT', true);
Paste this code to the place where you do not want to cached.
login plugin?
Thanks for the response, I do not understand where exactly to paste the code. Thank you for your help π
Grazie.
Hello,
Stergos Where are you? π
Hi, I’m using login-logout plugin. It’s all about the login widget, when someone is click logout and go back to the site the page is cached from w3tc and the widget is show the member still logged in (but is not actually logged in).
To solve this issue:
go to login-logout/login-logout.php
Find:
class WP_Widget_Login_Logout extends WP_Widget {
Add Before:
define('DONOTCACHEPAGE', true);
define('DONOTMINIFY', true);
define('DONOTCACHEOBJECT', true);
Hope this helps.
Check the login widget in action:
http://www.e-hacking.com
(I’m not using w3tc anymore…)
Ok Stergos, thanks for the solution.
I install the plugin on my site and add the code.
Grazie.
I have the same problem caused by the plugin “W3 total cache.”
If I do the logout, I get sent here: xxxx.it/wp-login.php?loggedout=true
Hi, I tried the plugin “login-logout” with the modification suggested by “Stergos” but do not solve the problem.
I tried the plugin “redirection” to direct the logout on the home site. But do not solve the problem.
Help me please