Skip to content

fix: show success banner immediately on multisite wizard complete page#880

Merged
superdav42 merged 2 commits intomainfrom
bugfix/multisite-wizard-complete-page-ux
Apr 16, 2026
Merged

fix: show success banner immediately on multisite wizard complete page#880
superdav42 merged 2 commits intomainfrom
bugfix/multisite-wizard-complete-page-ux

Conversation

@superdav42
Copy link
Copy Markdown
Collaborator

@superdav42 superdav42 commented Apr 16, 2026

Summary

After the multisite setup wizard completes all 4 installation steps successfully, the "Complete" page showed manual wp-config.php instructions instead of the green success banner on the first load. Users had to refresh the page to see the success message. This was confusing — a fully successful automated install looked like a failure.

Root cause

section_complete() checks is_multisite() to decide whether to show the success banner or manual instructions. But is_multisite() returns false on the first page load after MULTISITE=true is written to wp-config.php, because the PHP process that renders the complete page loaded wp-config.php before the constant existed (same OPcache timing issue described in #837).

The code already had a fallback: 'success' === $result checks for a result=success query parameter. But the install step had no form handler, so it used default_handler() which redirects to the next step without passing result=success.

Fix

Add handle_install_complete() as the form handler for the install step. When the JS auto-submits the form after all AJAX steps succeed, this handler redirects to ?step=complete&result=success. The existing section_complete() check picks up the parameter and shows the green banner immediately.

Before: Install succeeds → redirect to ?step=completeis_multisite() returns false → manual instructions shown
After: Install succeeds → redirect to ?step=complete&result=success'success' === $result is true → green banner shown

Files changed

  • EDIT: inc/admin-pages/class-multisite-setup-admin-page.php — added handler key to the install step definition, added handle_install_complete() method (+22 lines)

Verification

Browser-tested on a fresh WordPress 6.7.2 single-site install:

  1. Activated plugin on single site
  2. Ran full multisite setup wizard (all 4 steps green)
  3. Complete page immediately showed green "Success!" banner
  4. URL contained result=success query parameter
  5. No manual instructions shown
PHPStan: [OK] No errors

Related: #837, PR #874

Summary by CodeRabbit

  • Bug Fixes
    • Improved install wizard completion: Users now see a success notification and are redirected to the next setup step after completing the installation, ensuring a seamless transition through the multisite configuration process.

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.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85576c1f-91b8-4332-93a8-ddf33fc977ce

📥 Commits

Reviewing files that changed from the base of the PR and between 524108c and b226b46.

📒 Files selected for processing (1)
  • inc/admin-pages/class-multisite-setup-admin-page.php

📝 Walkthrough

Walkthrough

This change adds a completion handler to the install wizard section. The handler retrieves the next section link, appends a result=success query parameter, and redirects to that URL to display the success banner.

Changes

Cohort / File(s) Summary
Install Completion Handler
inc/admin-pages/class-multisite-setup-admin-page.php
Added handle_install_complete() method as the handler for the install wizard section. The handler appends a success result query parameter to the next section link and redirects, enabling the success banner to display even if multisite status is temporarily unset.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • WIP Create network wiz #218: Introduces the Multisite_Setup_Admin_Page class with wizard section handlers; this PR extends it by adding a specific install-section completion handler with redirect logic.

Poem

🐰 Hops toward the finish line with glee,
A handler catches the victory!
Success query param, redirect so true,
The wizard's last step sees the job through!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a success banner display on the multisite wizard complete page by implementing a form handler that redirects with result=success.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/multisite-wizard-complete-page-ux

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

Performance Test Results

Performance test results for 4204667 are in 🛎️!

Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown.

URL: /

Run DB Queries Memory Before Template Template WP Total LCP TTFB LCP - TTFB
0 40 37.73 MB 900.00 ms 203.00 ms (+37.00 ms / +18% ) 1150.00 ms 2172.00 ms (+64.00 ms / +3% ) 2066.35 ms (+48.05 ms / +2% ) 96.00 ms (+5.30 ms / +6% )
1 56 49.03 MB 962.00 ms (-27.50 ms / -3% ) 156.00 ms 1118.00 ms (-23.50 ms / -2% ) 2148.00 ms 2061.80 ms 87.50 ms

@github-actions
Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42 superdav42 merged commit 764abf4 into main Apr 16, 2026
11 checks passed
@superdav42
Copy link
Copy Markdown
Collaborator Author

Merged via pulse (squash).

  • Attempts: 1
  • Duration: ~12 min (branch update + CI re-run)

aidevops.sh v3.8.55 plugin for OpenCode v1.4.6 with claude-sonnet-4-6 spent 10m and 14,676 tokens on this as a headless worker. Solved in 56m.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant