[wp-trac] [WordPress Trac] #54801: Avoid WPDB errors when examining installation state of a site/network

WordPress Trac noreply at wordpress.org
Tue Jan 18 13:50:33 UTC 2022


#54801: Avoid WPDB errors when examining installation state of a site/network
--------------------------+---------------------
 Reporter:  schlessera    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.0
Component:  Database      |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------
Changes (by hellofromTonya):

 * keywords:  has-patch reporter-feedback => has-patch


Comment:

 Summarizing initial testing and investigation work that
 [https://wordpress.slack.com/archives/C02RQBWTW/p1642463564116600 happened
 in #core slack] between @peterwilsoncc and @costdev:

 With a default `wp-config.php` setup, running these cli commands results
 in errors on multiple WordPress versions going back into 4.2 (as far back
 as they tested):

 {{{
 wp db --yes reset
 wp core is-installed
 }}}

 Adding `define( 'MULTISITE', true );` gives `.wp_site` table errors.

 Adding these constants changes the errors to `.wp_blogs` and
 `.wp_sitemeta` tables:
 {{{
 define( 'MULTISITE', true );
 define( 'DOMAIN_CURRENT_SITE', 'localhost' );
 define( 'PATH_CURRENT_SITE', '/' );
 define( 'BLOG_ID_CURRENT_SITE', 1 );
 }}}

 **Root cause is unknown** and will require further investigation.

 As these errors are reproducible on multiple versions of WordPress and do
 not seem to be introduced in 5.9, leaving this ticket in 6.0 for further
 investigation, testing, and hopefully resolution.

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


More information about the wp-trac mailing list