[wp-trac] [WordPress Trac] #57139: Value type mismatch on is_site_meta_supported function

WordPress Trac noreply at wordpress.org
Wed Dec 21 16:26:40 UTC 2022


#57139: Value type mismatch on is_site_meta_supported function
--------------------------------+------------------------
 Reporter:  lucascarvalhopl     |       Owner:  (none)
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:
Component:  Networks and Sites  |     Version:  5.1
 Severity:  minor               |  Resolution:  invalid
 Keywords:                      |     Focuses:  multisite
--------------------------------+------------------------
Changes (by desrosj):

 * keywords:  reporter-feedback =>
 * milestone:  Awaiting Review =>


Comment:

 I agree with closing this out as the function is working as intended.

 I'm having a hard time understanding what is actually ''wrong'' here or
 why these `_doing_it_wrong()` warnings should be suppressed. In these
 instances, it seems like these users have encountered an incomplete update
 resulting in the missing database table.

 The first time this function runs, it will correctly set
 `site_meta_supported` as `0` (type doesn't matter really matter), skipping
 the update in the conditional. Any functions that attempt to use the
 feature will correctly result in debug messages.

 I did some testing and this is what I found:
 - Installed a new multisite site using 5.0.
 - Updated to version 5.1.
 - Ran the network upgrade.
 - Checked and the blogmeta table was created correctly.

 If someone encounters this issue, the best remedy is to:
 - delete the `site_meta_supported` meta key from the `wp_sitemeta` table.
 - Re-run the upgrade network script in the admin.

 This correctly adds the table that was missing, and the next time it's
 needed, will flag `site_meta_supported` as `1` in the database.

 If there are specific scenarios in Core where the lack of a blogmeta table
 is not failing gracefully, then please open a ticket detailing steps to
 take to reproduce. But in general, any multisite >= WP 5.1 ''should'' have
 the table unless an incomplete upgrade was encountered or the site owner
 explicitly chose to set `site_meta_supported` to `0` to prevent the table
 from being created.

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


More information about the wp-trac mailing list