Forums

Problem with caching comments names (17 posts)

  1. MrBurrrns
    Member
    Posted 1 year ago #

    I tried to search but didn't find anything related. I have the problem that on my page with Super Cache enabled, the names of the commenters are cached too (or at least it seems so).

    So when a visitor who wrote a comment before comes back to the page, the name stored on the page is sometimes different. Anybody else have that problem?

  2. donncha
    Member
    Posted 1 year ago #

    Do you have any other plugins that might interfere with comment cookies?

    Is your server going through a proxy?

  3. jkeegan2
    Member
    Posted 1 year ago #

    We saw the same thing, and still see it; we've yet to resolve it.

  4. MrBurrrns
    Member
    Posted 1 year ago #

    jkeegan2: Thanks for the reply, good to know I'm not alone. Hopefully it can be fixed soon.

    In the mean time, I'm gonna try 1 Blog Cacher:
    http://wordpress.org/extend/plugins/1-blog-cacher/

  5. donncha
    Member
    Posted 1 year ago #

    ok, so are you using a proxy server, or another plugin that might affect your cookies? What about your .htaccess file? Does that have the "wordpressuser" cookie line in it?

  6. MrBurrrns
    Member
    Posted 1 year ago #

    donncha: No proxy server, I don't think any other plugin is interfering and .htaccess was set properly according to the WP Super Cache instructions.

    As far as I can see, this is a WP Super Cache bug.

  7. Otto42
    Moderator
    Posted 1 year ago #

    donncha: What cookies will prevent a page from being supercached? I can't find it in the plugin in phase2 anywhere.

  8. donncha
    Member
    Posted 1 year ago #

    Otto42 - Look in your .htaccess. There's a check there for the 'wordpressuser' cookie. If it's set, then mod_rewrite won't serve the static html.

    MrBurrrns - If this is happening on a browser you control, can you check the cookies after you see a page with the wrong comment details filled in? See if there's a 'wordpressuser' cookie for your blog's domain.
    Then go into wp-content/cache/supercache/yourdomain.tld/pathtoyourpage/ and check the index.html - does that file have the incorrect comment information.

    Thanks!

  9. Otto42
    Moderator
    Posted 1 year ago #

    donncha: No, I meant that differently.

    Imagine a blog with no cache. I am a browser with a wordpressuser or even a comment_author cookie. I send a request to the blog. There is no cache file, so it runs some PHP and generates me a page.

    Now, because I sent that cookie, that generated page knows who I am and possibly puts my name on the page. Will this page be stored in the supercache? It shouldn't be. The supercache should be saying to itself "Hey, this user has an identity. I'd better not supercache this generated page content."

    Where's the code that does that logic? Because if it's not there, then I can see how this is happening. When a user comments on a post, the cache for that post is cleared/expired. Therefore the next load of that page, showing that users comment, will have the user's information on it because the user now has an identity. Even with the .htaccess rules, the page will be regenerated because the act of making the comment expired the cached content. Sure, *that* user will pull from the wp-cache. But the supercache still got saved, yesno?

  10. donncha
    Member
    Posted 1 year ago #

    Look at line 172 of wp-cache-phase2.php:
    $user_info = wp_cache_get_cookies_values();

    $user_info describes the current visitor, based on their cookies. If it's blank, then the supercache file is created. The next line runs a filter on $user_info but I doubt that's being used by anything.

    MRBurrrns - add ad error_log() in that loop and print_r $_COOKIE - if it's ever not empty and has commenter credentials then something is wrong.

  11. JaneLitte
    Member
    Posted 1 year ago #

    I don't have Super Cache and my site isn't maintaining commenters' names and other information.

  12. JaneLitte
    Member
    Posted 1 year ago #

    For me, I disabled the Sexy Comments plugin and that resolved the issue but obviously it is not related to a supercache issue. Just thought I would put out my resolution though in case someone searches.

  13. jkeegan2
    Member
    Posted 1 year ago #

    Try running something like this from your command line:

    grep -lr 'id="email" value=".*@.*"' /path/to/your/cache/directory

    See what it returns... Are you perhaps seeing that some wp-cache files are cached with the commenters' information in it?

  14. cableboy
    Member
    Posted 1 year ago #

    I'm having this same problem too. I'm getting comments like "oops that isn't me... the name field was already filled in"

  15. donncha
    Member
    Posted 1 year ago #

    cableboy - look at my suggestions above and try error logging it. Does that return anything?

  16. cableboy
    Member
    Posted 1 year ago #

    donncha I'm not sure how to use the command line but my guess is that the page getting cached has the user name already filled in.

  17. donncha
    Member
    Posted 1 year ago #

    cableboy - try the error logging I suggested above. super cache pages shouldn't be generated at all if a cookie is present.

Topic Closed

This topic has been closed to new replies.

About this Topic