• WordPress 4.9.7
    Multisite with subdirectories

    Error message (via newrelic): Error: Uncaught exception 'Error' with message 'Call to undefined function purge_url()' in /opt/wordpress/wp-content/plugins/varnish-http-purge/varnish-http-purge.php:864

    It looks like this happens only on subsites where Polylang is enabled

    Temp fix, disable Varnish HTTP Purge

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Looks like PolyLang is calling a deprecated function… purgeURL() was renamed to purge_url() which wasn’t really supposed to be called directly anyway. I’ll back port a fix for that, but that’s why.

    Thread Starter Per S?derlind

    (@pers)

    Thank you, I’ll pass this on to the guy at Polylang

    Thread Starter Per S?derlind

    (@pers)

    *facepalm* Couldn’t find purgeURL in Polylang, so I search my code. Looks like I have the following to my theme:

    
    } elseif ( 'publish' === $post->post_status ) {
    	// Purge varnish cache
    	if ( class_exists( '\VarnishPurger' ) ) {
    		$varnish_purge = new \VarnishPurger();
    		$varnish_purge->purgeUrl( get_permalink( $post_id ) );
    	}
    }
    
    • This reply was modified 6 years, 4 months ago by Per S?derlind.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘4.6.2 gives me Uncaught exception ‘Error’’ is closed to new replies.