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

Globalize `$blog_id`, `$site_id`, and `$public` before loading WordPress #2131

Merged
merged 2 commits into from Oct 8, 2015

Conversation

@danielbachhuber
Copy link
Member

commented Oct 8, 2015

Without $blog_id globalized, users with persistent object cache
drop-ins experience cache pollution.

vagrant@vip:/srv/www$ wp option get home
http://vip.local
vagrant@vip:/srv/www$ sudo service memcached restart
Restarting memcached: memcached.
vagrant@vip:/srv/www$ wp option get home
http://vip.local/fusion
vagrant@vip:/srv/www$ wp option get home --url=vip.local
http://vip.local/fusion
vagrant@vip:/srv/www$ sudo service memcached restart
Restarting memcached: memcached.
vagrant@vip:/srv/www$ wp option get home --url=vip.local
http://vip.local

Somewhere, there's usage of $blog_id in WordPress that should be
explicitly globalized, but isn't.

See #2089 (comment)

Globalize `$blog_id` before loading WordPress
Without `$blog_id` globalized, users with persistent object cache
drop-ins experience cache pollution.

```
vagrant@vip:/srv/www$ wp option get home
http://vip.local
vagrant@vip:/srv/www$ sudo service memcached restart
Restarting memcached: memcached.
vagrant@vip:/srv/www$ wp option get home
http://vip.local/fusion
vagrant@vip:/srv/www$ wp option get home --url=vip.local
http://vip.local/fusion
vagrant@vip:/srv/www$ sudo service memcached restart
Restarting memcached: memcached.
vagrant@vip:/srv/www$ wp option get home --url=vip.local
http://vip.local
```

Somewhere, there's usage of `$blog_id` in WordPress that should be
explicitly globalized, but isn't.
@danielbachhuber

This comment has been minimized.

Copy link
Member Author

commented Oct 8, 2015

Previously #2124

@jeremyfelt

This comment has been minimized.

Copy link

commented Oct 8, 2015

$site_id and $public are others in ms-settings.php. 😞 Not sure if that has the same impact somewhere.

https://github.com/WordPress/WordPress/blob/0e7c1d3b14db5614e012c2cae1401e2fce71d3bd/wp-includes/ms-settings.php#L198-L207

@danielbachhuber danielbachhuber changed the title Globalize `$blog_id` before loading WordPress Globalize `$blog_id`, `$site_id`, and `$public` before loading WordPress Oct 8, 2015

danielbachhuber pushed a commit that referenced this pull request Oct 8, 2015
Daniel Bachhuber
Merge pull request #2131 from wp-cli/2089-globalize-blog-id
Globalize `$blog_id`, `$site_id`, and `$public` before loading WordPress

@danielbachhuber danielbachhuber merged commit fac9c4f into master Oct 8, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the 2089-globalize-blog-id branch Oct 8, 2015

@danielbachhuber

This comment has been minimized.

Copy link
Member Author

commented Oct 8, 2015

Thanks @jeremyfelt

@danielbachhuber

This comment has been minimized.

Copy link
Member Author

commented Oct 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.