[wp-trac] [WordPress Trac] #33206: Ignore the sitecategories table during network update if global terms are not enabled
WordPress Trac
noreply at wordpress.org
Fri Aug 7 02:46:40 UTC 2015
#33206: Ignore the sitecategories table during network update if global terms are
not enabled
-----------------------------+-----------------------
Reporter: nofearinc | Owner: dd32
Type: defect (bug) | Status: assigned
Priority: low | Milestone: 4.3
Component: Upgrade/Install | Version: 4.2
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+-----------------------
Comment (by dd32):
Replying to [comment:9 SergeyBiryukov]:
> Replying to [comment:8 SergeyBiryukov]:
> > [attachment:33206.diff] causes a fatal error
>
> In [source:tags/4.2.4/src/wp-settings.php#L81 wp-settings.php],
`wp_set_wpdb_vars()` happens before `wp_start_object_cache()`, so the
object cache is not yet available. We're trying to call
`get_site_option()` via [source:tags/4.2.4/src/wp-
includes/functions.php#L3881 global_terms_enabled()] too early.
>
> Checking the DB table seems to work, see [attachment:33206.2.diff].
We could flip it so that `wp_set_wpdb_vars()` happens after
`wp_start_object_cache()`, however, `get_site_option` still requires that
`wp_set_wpdb_vars()` has run, so we've got a circular dependency we can't
work around.
So; I'd rather handle it outside of `wpdb` if a query would always be
required. [attachment:33206.3.diff 33206.3.diff] is a untested version of
nofearinc's patch which IMHO should be good to go.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33206#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list