WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Log out page cache (11 posts)

  1. Stergos
    Member
    Posted 1 year ago #

    Hi, I'm only use the "page cache" feature from all the features of this plugin. I have set it to Disk: Basic and I have checked the option "Don't cache pages for logged in users" but when a logged in user is click to logout the page is still showing that the user is logged in and this is happens only on the homepage where the user is click to login.

    Is there any way to solve this issue? Thanks!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Stergos
    Member
    Posted 1 year ago #

    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!

  3. Stergos
    Member
    Posted 1 year ago #

    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.

  4. Stergos
    Member
    Posted 1 year ago #

    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();
        }
    }
  5. checevo
    Member
    Posted 1 year ago #

    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.

  6. Stergos
    Member
    Posted 1 year ago #

    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.

  7. checevo
    Member
    Posted 1 year ago #

    login plugin?

    Thanks for the response, I do not understand where exactly to paste the code. Thank you for your help :)

    Grazie.

  8. checevo
    Member
    Posted 1 year ago #

    Hello,

    Stergos Where are you? :(

  9. Stergos
    Member
    Posted 1 year ago #

    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...)

  10. checevo
    Member
    Posted 1 year ago #

    Ok Stergos, thanks for the solution.

    I install the plugin on my site and add the code.

    Grazie.

  11. checevo
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.