Support » Plugin: Editorial Calendar » Possible issues using Editorial Calendar with Varnish HTTP Purge

  • Resolved Kenn Wilson


    I’ve been using Editorial Calendar for a while now without issue. But I recently installed the Varnish HTTP Purge plugin and ever since I’ve been getting the dread “There was an error contacting your blog” error message when dragging posts from one day to another or deleting them.

    To be clear, the post is rescheduled or deleted successfully, but that red error is shown and the activity spinner graphic does not stop. No JavaScript errors are logged in the console.

    If I disable the Varnish plugin, it works fine. Varnish itself is not the problem though, as I’ve been using it all along. This issue began when I recently installed the aforementioned plugin.

    The Varnish plugin itself is simple – it just sends an HTTP PURGE request to URLs of changed posts (eg, rescheduled or deleted posts). The problem seems to be that scheduled posts managed via Editorial Calendar are by definition not yet published and so the PURGE request returns a 404 (confirmed in my Nginx log).

    That’s not your problem, of course. I’m just wondering if you see any reason this error should be triggered by this. And, if so, if there’s a way to make EC a little more resistant to it.

    The entirety of the Varnish HTTP Purge code is about 50 lines, many of which are whitespace, so it’s pretty easy to see what’s going on:
    (the action happens in purgeUrl())

    Any insights on this? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Kenn,

    In Varnish HTTP Purge plugin, in protected function purgeUrl($url), please comment out all the four lines. and use the following one-liner…

    wp_remote_request( $url, array( 'method' => 'PURGE', 'timeout' => 5,));

    Does this resolve the issue for you?

    Plugin Author Zack Grossbart


    Hi Kenn,

    There are a number of reasons you can get the “Error contacting your blog” message. Please let us know if Pothi’s fix doesn’t work and I’m happy to log into your blog and take a look.


    Pothi: That took care if it nicely, thanks! I’ll submit that to the author of the Varnish plugin.

    Glad to know about it. Thanks for reaching out to the developer of the Varnish plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Possible issues using Editorial Calendar with Varnish HTTP Purge’ is closed to new replies.