WordPress.org

Ready to get started?Download WordPress

Forums

Editorial Calendar
[resolved] Possible issues using Editorial Calendar with Varnish HTTP Purge (5 posts)

  1. Kenn Wilson
    Member
    Posted 1 year ago #

    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:
    http://plugins.trac.wordpress.org/browser/varnish-http-purge/trunk/varnish-http-purge.php
    (the action happens in purgeUrl())

    Any insights on this? Thanks.

    http://wordpress.org/extend/plugins/editorial-calendar/

  2. Pothi
    Member
    Posted 1 year ago #

    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?

  3. Zack Grossbart
    Member
    Plugin Author

    Posted 1 year ago #

    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.

    Thanks,
    Zack

  4. Kenn Wilson
    Member
    Posted 1 year ago #

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

  5. Pothi
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic