[wp-trac] [WordPress Trac] #54634: Database access on potentially missing table during WP installation

WordPress Trac noreply at wordpress.org
Wed Dec 15 16:41:00 UTC 2021


#54634: Database access on potentially missing table during WP installation
--------------------------+-----------------------------
 Reporter:  schlessera    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When installing a multisite, there is a potential access to a non-existent
 database table that needs to be skipped to avoid warnings/errors.


 {{{
 001 Scenario: Install WordPress multisite with existing multisite
 constants in wp-config file
 # features/core-install.feature:204
       When I run `wp core multisite-install --url=foobar.org --title=Test
 --admin_user=wpcli --admin_email=admin at example.com
 --admin_password=password --skip-config` # features/core-
 install.feature:226
         $ wp core multisite-install --url=foobar.org --title=Test
 --admin_user=wpcli --admin_email=admin at example.com
 --admin_password=password --skip-config
         WP-CLI test suite: Sent email to admin at example.com.
         Created single site database tables.
         Set up multisite database tables.
         Success: Network installed. Don't forget to set up rewrite rules
 (and a .htaccess file, if using Apache).

         WordPress database error Table 'wp_cli_test.wp_sitemeta' doesn't
 exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key =
 'can_compress_scripts' AND site_id = 1 made by require_once('vendor/wp-cli
 /wp-cli/php/wp-cli.php'), WP_CLI\bootstrap,
 WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start,
 WP_CLI\Runner->load_wordpress, require('wp-settings.php'),
 do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters,
 register_block_core_file, register_block_type_from_metadata,
 register_block_script_handle, wp_register_script, wp_scripts,
 WP_Scripts->__construct, WP_Scripts->init,
 do_action_ref_array('wp_default_scripts'), WP_Hook->do_action,
 WP_Hook->apply_filters, wp_default_packages, wp_register_tinymce_scripts,
 script_concat_settings, get_site_option, get_network_option
         cwd: /tmp/wp-cli-test-run--61ba15774b81d8.03513765/
         run time: 1.1995339393616
         exit status: 0 (RuntimeException)
 }}}

 The problem comes from the `script_concat_settings()` function (triggered
 by `'wp_default_scripts'` => `wp_register_tinymce_scripts()`), which tries
 to retrieve the site option `'can_compress_scripts'`.

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


More information about the wp-trac mailing list