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

_version key never gets set correctly if /wp-admin/ lives at another domain #21

Closed
leedo opened this issue Sep 16, 2013 · 7 comments
Closed

Comments

@leedo
Copy link

leedo commented Sep 16, 2013

The only place that the _version key gets set is in the batcache manager plugin. It uses get_permalink() to determine the URL. This is a problem if /wp-admin/ is accessed through a different domain than the main site. For us it sets the key using cms.site.com, but batcache looks it up using site.com, so it misses every time. I am not sure how to best fix this, but we have a nasty str_replace hacked in for now.

@leedo
Copy link
Author

leedo commented Sep 16, 2013

One solution may be to disregard the hostname portion, but that may not play well with multi-site features.

@crbn60
Copy link

crbn60 commented Sep 16, 2013

I think I'm running into this as well, mind sharing exactly what you did to kludge around this?

@leedo
Copy link
Author

leedo commented Sep 16, 2013

In the batcache manager plugin we're doing a string replace to switch the domain from our cms domain to the production domain:

function batcache_clear_url($url) {
    if ( empty($url) )
        return false;
    $url = str_replace("cms.site.com", "site.com", $url);
    ...

I should also mention that we weren't actually using advanced-cache.php on our cms domain, which was another problem.

@crbn60
Copy link

crbn60 commented Sep 17, 2013

Thank you, I added that in. I still can't seem to conclude that batcache is handling my requests, though, as it still does not give me any feedback.

@leedo
Copy link
Author

leedo commented Sep 18, 2013

Have you tried enabling the debug option? That will insert a comment at the end of your <head> tag with some stats.

@crbn60
Copy link

crbn60 commented Sep 18, 2013

I did trie that, but it doesn't seem to have any effect.

@vnsavage
Copy link
Contributor

This means that you probably either don't have advanced-cache.php or WP_CACHE is not set or you're testing in a browser which has been logged in.

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

3 participants