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 π
Which ‘new’ php are you talking about? A specific version like 5.5?
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 π
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?
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
Sweet! π Will patch as soon as my coffee’s done a’brewing!
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!
WOO! That’s awesome to hear π colinleroy rocks!