Skip to content

Managed MySQL PHPUnit multisite omits network tables #2056

Description

@chubes4

Summary

A managed wordpress.phpunit run configured with MySQL and multisite boots WordPress without creating the required multisite network tables. PHPUnit continues, but WordPress emits database errors for wptests_blogs and wptests_sitemeta, so multisite behavior cannot be validated faithfully.

Evidence

Runtime configuration:

{
  "database_type": "mysql",
  "validation_dependencies": [
    { "type": "local", "path": "<checkout>/.ci/data-machine", "plugin_slug": "data-machine", "activate": true },
    { "type": "local", "path": "<checkout>/.ci/data-machine-events", "plugin_slug": "data-machine-events", "activate": true }
  ],
  "wp_codebox_multisite": true,
  "wp_codebox_phpunit_bootstrap_mode": "managed"
}

Exact startup diagnostics:

WordPress database error Table 'runtime.wptests_blogs' doesn't exist for query SELECT wptests_blogs.blog_id ... made by pg_run_install_stage, ... wp-phpunit/includes/install.php, ... ms_load_current_site_and_network
WordPress database error Table 'runtime.wptests_sitemeta' doesn't exist for query SELECT meta_value FROM wptests_sitemeta ... made by pg_run_install_stage, ... wp-phpunit/includes/install.php, ... get_network_option
WordPress database error Table 'runtime.wptests_blogs' doesn't exist for query SELECT * FROM wptests_blogs WHERE blog_id = 1 LIMIT 1 ... ms_site_check, get_site, WP_Site::get_instance

The managed suite then reports 276 tests, but current-site lookups and every network option operation are running against an incomplete schema.

Expected

When multisite is enabled, the managed install stage creates and seeds at least the standard blogs, blogmeta, site, sitemeta, registration_log, and signups tables before WordPress multisite bootstrap and plugin activation.

Impact

Consumers cannot establish a real managed MySQL/multisite PHPUnit baseline. Adding per-test cache objects or bypassing get_site() would hide the broken runtime and would not validate multisite behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions