[wp-trac] [WordPress Trac] #33206: Ignore the sitecategories table during network update if global terms are not enabled

WordPress Trac noreply at wordpress.org
Thu Jul 30 13:41:18 UTC 2015


#33206: Ignore the sitecategories table during network update if global terms are
not enabled
-----------------------------+-----------------------
 Reporter:  nofearinc        |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  low              |  Milestone:  4.3
Component:  Upgrade/Install  |    Version:  4.2
 Severity:  normal           |   Keywords:  has-patch
  Focuses:                   |
-----------------------------+-----------------------
 While updating a multisite network, I saw that in the error log:

 {{{
     WordPress database error Table 'automobile.au_sitecategories' doesn't
 exist for
     query SHOW FULL COLUMNS FROM `au_sitecategories` made by
     wp_upgrade, upgrade_network, maybe_convert_table_to_utf8mb4
 }}}

 I found that `upgrade_network` runs `maybe_convert_table_to_utf8mb4` in
 `wp-admin/includes/upgrade.php` by fetching `$wpdb->tables( 'global' );`
 which always returns the sitecategories table even if it wasn't defined.

 I've added the solution provided by nacin for #12964 in both changeset
 upgrade statements to ignore the database query if global terms are not
 enabled. I also wonder whether this shouldn't be handled in the `wpdb`
 class when calling the switch within the `tables` function.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33206>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list