From b226b46b26b2dd6e593fa8ee2e4fc2d455364c4f Mon Sep 17 00:00:00 2001 From: David Stone Date: Wed, 15 Apr 2026 21:02:50 -0600 Subject: [PATCH] fix: show success banner immediately on multisite wizard complete page After all 4 install steps succeed, the JS auto-submits the form which redirects to the complete step. Previously, section_complete() checked is_multisite() to decide whether to show the success banner or manual instructions. But is_multisite() returns false on the first load after MULTISITE=true is written to wp-config.php, because the current PHP process loaded before the constant existed (OPcache or same-request timing). This caused users to see scary 'unable to configure' manual instructions despite a fully successful automated install. Fix: add a handle_install_complete() handler for the install step that redirects to the complete step with result=success as a query parameter. section_complete() already checks for this parameter, so the green success banner now appears immediately without requiring a page refresh. --- .../class-multisite-setup-admin-page.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/inc/admin-pages/class-multisite-setup-admin-page.php b/inc/admin-pages/class-multisite-setup-admin-page.php index 6a6d618e..4ee190d9 100644 --- a/inc/admin-pages/class-multisite-setup-admin-page.php +++ b/inc/admin-pages/class-multisite-setup-admin-page.php @@ -147,6 +147,7 @@ public function get_sections() { 'description' => __('Setting up your WordPress Multisite network...', 'multisite-ultimate'), 'next_label' => Core_Installer::get_instance()->all_done() ? __('Begin Ultimate Multisite Setup →', 'ultimate-multisite') : __('Install', 'ultimate-multisite'), 'disable_next' => true, + 'handler' => [$this, 'handle_install_complete'], 'back' => false, 'fields' => [ 'terms' => [ @@ -307,6 +308,27 @@ public function handle_configure(): void { exit; } + /** + * Handles the install step form submission. + * + * The JS auto-submits the form after all AJAX installation steps succeed. + * This handler redirects to the complete step with result=success so + * that section_complete() can show the success banner immediately, + * even when is_multisite() returns false because OPcache is serving + * a stale wp-config.php that doesn't yet have the MULTISITE constant. + * + * @since 2.6.1 + * @return void + */ + public function handle_install_complete(): void { + + $next_url = add_query_arg('result', 'success', $this->get_next_section_link()); + + wp_safe_redirect($next_url); + + exit; + } + /** * Completion section view. *