Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter colinleroy

    (@colinleroy)

    PS: The patch also add a check for $varniship != null, because on new PHP, isset() apparently return true even if there’s no define present. Without this part, it tries to purge http:///wordpress_dir/post with no hostname πŸ™‚

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Which ‘new’ php are you talking about? A specific version like 5.5?

    Thread Starter colinleroy

    (@colinleroy)

    It’s php 5.4.4 on Debian Stable 7.2
    isset($varniship) returns true
    gettype($varniship) returns boolean (??)
    $varniship returns an empty string.

    I didn’t have that problem with PHP 5.3.10 in Ubuntu 12.04.

    PS: there’s an extra error_log() in my patch which you probably don’t want πŸ™‚

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    When comments are edited/added that should trigger edit_post.

    edit_post
    Runs when a post or page is updated/edited, including when a comment is added or updated (which causes the comment count for the post to update). Action function arguments: post or page ID.

    So I think if there’s actually an issue with the comment, it’s the Varnish IP error πŸ™‚ Can you try JUST that null check?

    Thread Starter colinleroy

    (@colinleroy)

    You’re absolutely right (I added the null check after the comments callback, and I did briefly wonder that it used to purge cache on new comments) : Just the null check is enough. So here’s an updated and much simpler patch :

    http://colino.net/blog/wp-content/varnish-http-purge-null-check.patch

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Sweet! πŸ™‚ Will patch as soon as my coffee’s done a’brewing!

    Thread Starter colinleroy

    (@colinleroy)

    Great! Thanks for your reactivity! πŸ™‚ (and your plugin!)

    I’m running 5.4 on an Centros 6 VPS install and the Manual Purge did not work until this patch. Thanks!

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    WOO! That’s awesome to hear πŸ™‚ colinleroy rocks!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[PATCH] A little patch to purge on comment posting’ is closed to new replies.