[wp-trac] [WordPress Trac] #36717: Allow to access network and site properties using the current naming conventions

WordPress Trac noreply at wordpress.org
Thu Jun 9 00:13:00 UTC 2016


#36717: Allow to access network and site properties using the current naming
conventions
-------------------------------------+------------------------
 Reporter:  flixos90                 |       Owner:  flixos90
     Type:  enhancement              |      Status:  reopened
 Priority:  normal                   |   Milestone:  4.6
Component:  Networks and Sites       |     Version:  4.5
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  multisite
-------------------------------------+------------------------

Comment (by dd32):

 Replying to [comment:20 jeremyfelt]:
 > This broke things on w.org last night, and needs some more exploration.
 >
 > From @dd32 [https://wordpress.slack.com/archives/core/p1465365335000649
 in Slack]:
 >
 > > "When you `serialize()` a object which has public properties, and
 `unserialize()` that same string later when the object has a private
 property, the public property gets set which overrides any `__get()`
 methods."
 >
 > Full `WP_Site` objects with existing public properties were stored in
 cache via `get_blog_details()`, which was being used along with the
 `pre_get_site_path` filter. There will be other sites doing something
 similar.

 FWIW it turned out that also broke a bunch of other things, such as
 editing network sites, and anything else that performed comparisons on
 blog_id's.

 It looks like #36935 will indeed fix the underlying cache issue, although
 existing cached data will not be invalidated, which will be an issue (If
 this change had invalidated that cache, it would've been fine).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36717#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list