WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
TC do not detect user logout (20 posts)

  1. vugluskra
    Member
    Posted 3 years ago #

    I have several domains on same virtual hosting with same TC version (9.2.3) installed. TC works on all domains except one - where WordPress installed in separate subdirectory (i see only one difference). Settings are: do not cache pages and do not minfy for logged in users.
    If i logged in, i see in the page source:

    Minified using disk (User is logged in)
    Page Caching using disk (enhanced) (User is logged in)
    Database Caching using disk (user is logged in)
    Object Caching 43/96 objects using disk

    OK. But after logout, i see the same messages (User is logged in) and caching and minify do not works at all. Any idea how to fix this issue? Sorry for my english.

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

  2. vugluskra
    Member
    Posted 3 years ago #

    Edit: Fresh WordPress 3.1.4 installtion with default theme and plugins.

  3. alexbenfica
    Member
    Posted 3 years ago #

    Hi vugluskra!

    Same problem here!
    If set true any options like:

    "Do not cache for logged in users"

    W3TC will put the message "User is logged in" and not cache or minify HTML and CSS.

    So strange and I have the same issue on all my sites.

    I'm trying solve it with help of my webhost (Dreamhost) and they are doing the best to help me!

    Do you use Dreamhost too?
    Any progress in solving this?

    Ps.: I'm not logged in when this message is showed.
    Happens with any browser... even in other machines.

    <!-- W3 Total Cache: Page cache debug info:
    Engine: disk
    Cache key: w3tc_www.wimi.com.br_1_page_ff30db27e453d73ffe3053e7b7ee4121
    Caching: disabled
    Reject reason: User is logged in
    Status: not cached
    Creation Time: 0.301s
    Header info:
    Set-Cookie: wordpress_logged_in_c4d83dd5e8d12764cd3165a90a7ebb12=%7C1310957188%7C2526c402f7b066153bef19da9d411d0b; expires=Mon, 18-Jul-2011 02:46:28 GMT; path=/; httponly

  4. vugluskra
    Member
    Posted 3 years ago #

    Do you use Dreamhost too?
    No.
    Any progress in solving this?
    Nope. Waiting for new version :)

    <!-- W3 Total Cache: Page cache debug info:
    Engine:             disk (enhanced)
    Cache key:          _index.html
    Caching:            disabled
    Reject reason:      User is logged in
    Status:             not cached
    Creation Time:      0.155s
    Header info:
    Set-Cookie:         w3tc_referrer=http%3A%2F%2Fxxx.com%2Fcms%2Fwp-login.php%3Floggedout%3Dtrue; path=/cms/
    Content-Type:       text/html; charset=UTF-8
    X-Powered-By:       W3 Total Cache/0.9.2.3
    -->
  5. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    If you clear your cookies the problem persists? Can anyone still having this issue submit a bug submission from the support tab of the plugin?

  6. alexbenfica
    Member
    Posted 3 years ago #

    The problem persists!
    Even clearing the cookies! I'm logged in via Firefox... and problem happens with any other browser, and even in places with different IP address.

    I'm trying other plugins cache... but none of them does the browser cache like w3tc.

    Do you want me to setup an enviroment where you can see this happenning?

  7. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Sure, that would be great. Please submit a bug submission form with the details as noted above.

  8. Eric Andrew Lewis
    Member
    Posted 3 years ago #

    I'm having a similar issue with the Login with AJAX plugin. After logging out, ONLY on the homepage a cached page shows up, looking like the user is still logged in. The WP admin bar is still there. Go to any other page on the website and the user is logged out.

  9. alexbenfica
    Member
    Posted 3 years ago #

    Hi Frederick...

    Thank you for your help.

    This site has this problem happenning right now.

    http://www.dowordpress.com.br/

    I've configured to "not cache page for logged in users".
    Try reloading the home then you'll see the page cache being recriated each reload.

    Only page cache is enabled.
    Only w3tc plugin is enabled.
    Last WP an w3tc versions.
    Default WP theme.
    Other plugin optios are default.

    What other information would you like me to send?

  10. alexbenfica
    Member
    Posted 3 years ago #

    And ...
    I did the bug report submission too ... as you asked me to do. :)

    "The support request has been successfully sent."

  11. deindeal
    Member
    Posted 2 years ago #

    Hi *,
    do you have any news to the problem? I havew the same link. "After logging out, ONLY on the homepage a cached page shows up, looking like the user is still logged in. The WP admin bar is still there. Go to any other page on the website and the user is logged out. " but the other way roung. If I trys to login, nothing happens, go the any other page I'm logged in???

  12. alexbenfica
    Member
    Posted 2 years ago #

    HI deindean, Frederick...

    All problems I was having with the w3tc was caused for malicious code inserted into my theme and WordPress files!

    Problably my site were hacked by some infected templated I tested which caused all this issues with my sites.

    I found the malicious code and reinstalled everithing from scratch. I tell the whole story here... it is in Portuguese, but I tested and Google translator can do a god job on it :)

    Files that I found malicious code were: functions.php, searchform.php and hundreds of wordpress core fires. So, the theme can be mannually corrected... but WordPress must be reinstalled! I did it with dozens of sites... some days lost in it!

    vugluskra: my problem was exactly the same you're facing now... maybe it has the same cause.

    http://www.dowordpress.com.br/seguranca-wordpress-solucao/

    Frederick, Thank you for helping with this!

  13. robot-bobot
    Member
    Posted 2 years ago #

    I have similar problem with logout (Firefox 8.0).
    I use W3 Total Cache and Theme My Login and other 30 plugins
    When i change Authentication Unique Keys and Salt in wp-config.php everything started to work fine

  14. ivnus
    Member
    Posted 2 years ago #

    I'm also showing the logout button, but when I navigate or refresh the page...it shows me logged out.

    W3 Total Cache is browser caching the page and showing that I'm still logged in.

    anyone found a fix for this yet?

  15. alexbenfica
    Member
    Posted 2 years ago #

    Ivnus... please check your site for maliciuos code...!
    I've seen this same issue with some customers and thar was my problem... reported above!

    I'm suposing you have already tested with other browser and cleared cache and cookies, right?

    The plugin really works fine...

  16. Ksaveras
    Member
    Posted 2 years ago #

    This plugins does not work fine with other plugins that use 'wordpress' word in their cookie names.

    I had same problem as previously persons. Quick story:
    2 browsers: FF(10) and IE(9), WP 3.3.1
    FF open wp page, login and enable W3TC - (cache user logged in is disabled).
    Open front page, other pages, posts - Page Caching using disk: enhanced (User is logged in) This is good.
    Open IE, user is NOT logged in, cleared caches, open pages - Page Caching using disk: enhanced (User is logged in) WTF? User is NOT logged in.

    Ok browsed google for answers found this topic. Strange - no solution.
    Tried to see myself why W3TC thinks that user is logged in. Looked for code where it echoed that he thinks that user is logged in and found that cookie name is checked if it starts with 'wordpress' text. BTW - developers aren't really smart and good - some code is repeated twice and this is not best practice example. Ok I left this as is.
    Hmm next question - why W3TC founds cookie with 'wordpress' start in cookie names? Quick press F12 in IE and use developers tools. I found that Polylang plugin sets last used language in user cookie. Yes it's good for Polylang users, but breaks W3TC.
    Who to blame? If register Polylang issue, then maybe there are other plugins that also use 'wordpress' start string in their cookie names? I don't want to find them all.
    If W3TC could change cookie name checking - maybe this could solve the problem? Sounds good.
    Examined WP cookies when user is logged in and not logged in. Found that special wordpress_logged_in_{hash} cookie exists at the same time with wordpress_{hash} cookie when user is logged in and they both are absent when user is logged off.

    File: lib/W3/PgCache.php
    748: if (strpos($cookie_name, 'wordpress') === 0) {
    changed to
    748: if (strpos($cookie_name, 'wordpress_logged_in') === 0) {

    File: lib/W3/Db.php
    614: if (strpos($cookie_name, 'wordpress') === 0) {
    changed to
    614: if (strpos($cookie_name, 'wordpress_logged_in') === 0) {

    Tested again with FF and IE - now results are much better and functionality looks not broken.

    Now developers should reject or accept this change.

  17. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    This will be fixed in the next release, thanks.

  18. hughra
    Member
    Posted 2 years ago #

    I two am having an issue. I followed the above instructions and it did not fix it.

    What is happening is when a user logs in or off it is not updating the html or deleting the cookie. When this plug in is disabled it works fine.

  19. Ksaveras
    Member
    Posted 2 years ago #

    hughra, You should identify Your problem. Update to latest version plugins. Disable all plugins, enable W3TC, test. If it does not work - perhaps starting from fresh install would be solution.
    Enable one plugin, test. Enable second plugin, test ... etc.

    My post was about concrete problem when several plugins used 'wordpress' in their cookie names and I used debugging tools to find out the problem.
    It does not mean that it will work for all problems. It it did not help You it means that problem is another.

  20. Frederick Townes
    Member
    Plugin Author

    Posted 2 years ago #

    @Ksaveras, thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic