Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't purge single posts & wrong urls #71

Open
someguy9 opened this issue Dec 19, 2014 · 1 comment
Open

Won't purge single posts & wrong urls #71

someguy9 opened this issue Dec 19, 2014 · 1 comment

Comments

@someguy9
Copy link
Contributor

I noticed in the varnishlog my blog (located at /blog) would appear as /blog/blog in the urls

I added this to the WPVarnishPurgeObject function to fix the issue above
add after "$wpv_url = $wpv_blogaddr . $wpv_url;"

if (0 === strpos($wpv_url, $wpv_blogaddr . $wpv_blogaddr)) {
    $wpv_url = str_replace($wpv_blogaddr . $wpv_blogaddr, $wpv_blogaddr, $wpv_url);
}

Also single posts wouldn't purge so I added

$this->WPVarnishPurgeObject($wpv_url);

before "// Add support for multipage content for posts and pages"

hope this helps someone (I'm running WP 4.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@someguy9 and others