[wp-trac] [WordPress Trac] #46167: Network update does not create wp_blogmeta table

WordPress Trac noreply at wordpress.org
Fri Mar 1 22:35:52 UTC 2019


#46167: Network update does not create wp_blogmeta table
--------------------------------+------------------------
 Reporter:  waryn               |       Owner:  (none)
     Type:  defect (bug)        |      Status:  reopened
 Priority:  normal              |   Milestone:  5.1.1
Component:  Networks and Sites  |     Version:  5.1
 Severity:  major               |  Resolution:
 Keywords:  needs-patch         |     Focuses:  multisite
--------------------------------+------------------------

Comment (by jeremyfelt):

 I've stepped through the code looking for a way to reproduce this and so
 far have had no luck unless I prevent it by making
 `wp_should_upgrade_global_tables()` return `false`.

 I'm going to talk through this just in case I'm missing something.

 Setup fresh site:
 1. `wp db drop && wp db create && rm wp-config.php`
 2. `wp core download --version=5.0.3 --force`
 3. `wp core config ...`
 4. `wp core install ...`
 5. `wp core multisite-convert`

 Upgrade from 5.0.3 to 5.1:
 1. Go to `wp-admin/` and click "Please update now" (`wp-admin/network
 /update-core.php`).
 2. Click "Update Now" to update to WordPress 5.1.
 3. Success, redirected to `wp-admin/network/about.php`.
 4. Click "Upgrade Network" (`wp-admin/network/upgrade.php`).
 5. Click "Upgrade Network".... All done!

 The `wp_blogmeta` table now exists as expected.

 Ways I can get `wp_blogmeta` to not be created after running the upgrade
 routine:

 1. Define `DO_NOT_UPGRADE_GLOBAL_TABLES` as `true`.
 2. Filter `wp_should_upgrade_global_tables` to `false`.
 3. Make `wp_should_upgrade_global_tables()` fail in some other way.
 4. Not `GRANT CREATE` privileges to the WP database user (unlikely).

 I'm not seeing where a bug would be here.

 There's a good chance in some cases that people are seeing the PHP notice
 just because they haven't yet updated all sites on the network. As
 @spacedmonkey highlighted, we should take care of that notice.

 For the rest, we need to figure out what the reason is for the database
 table not being created, even after running the routine at `wp-
 admin/network/upgrade.php`.

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


More information about the wp-trac mailing list