Support » Fixing WordPress » Problem with caching comments names

  • 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?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Do you have any other plugins that might interfere with comment cookies?

    Is your server going through a proxy?

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

    Thread Starter mrburrrns

    (@mrburrrns)

    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/

    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?

    Thread Starter mrburrrns

    (@mrburrrns)

    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.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

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

    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!

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    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?

    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.

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

    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.

    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?

    I’m having this same problem too. I’m getting comments like “oops that isn’t me… the name field was already filled in”

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

    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.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Problem with caching comments names’ is closed to new replies.