[Personal-WP] Fix ?plugin= URL parameter not installing plugins#3218
Merged
[Personal-WP] Fix ?plugin= URL parameter not installing plugins#3218
Conversation
39f6894 to
8f6d4cb
Compare
8f6d4cb to
3d39c44
Compare
The plugins shorthand property from URL blueprints was being lost during the merge in bootSiteClient. The merge only preserved steps and landingPage, ignoring the plugins array. Also, query overrides like ?url= (landing page) were not being applied when resolving blueprints for existing sites. Changes: - Pass through plugins property in boot-site-client.ts merge - Call applyQueryOverrides in resolveUrlParamsForExistingSite to handle ?url=, ?login=, ?language=, etc. parameters - Remove gutenberg-pr, gutenberg-branch, core-pr from actionable params (these are for fresh installs, not existing sites) - Add unit tests for resolveUrlParamsForExistingSite
3d39c44 to
0ad97ed
Compare
adamziel
approved these changes
Jan 29, 2026
|
Nice one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
When visiting a Personal WordPress site with
?plugin=abc, the plugin was not being installed. The URL parameter would simply disappear without the plugin being added to the site. Similarly,?url=for setting the landing page was not working.Supported URL Parameters for Existing Sites
The following URL parameters can be used to modify an existing Personal WordPress site:
plugin?plugin=woocommerce&plugin=jetpacktheme?theme=flavorurl?url=/wp-admin/plugins.phpblueprint-url?blueprint-url=https://...import-site?import-site=https://...import-wxr?import-wxr=https://...Not supported for existing sites:
gutenberg-pr,gutenberg-branch,core-pr(these are meant for fresh temporary installs)Implementation details
Issue 1: Plugins property lost during merge
In
boot-site-client.tswhere URL blueprints are merged into the boot blueprint, the merge only preservedstepsandlandingPage, but ignored thepluginsshorthand property.Issue 2: Query overrides not applied for existing sites
The
applyQueryOverridesfunction (which handles?url=,?language=, etc.) was not being called inresolveUrlParamsForExistingSite.Changes:
pluginsproperty inboot-site-client.tsmerge (when present)applyQueryOverridesinresolveUrlParamsForExistingSiteto handle query parametersgutenberg-pr,gutenberg-branch,core-prfrom actionable params for existing sitesresolveUrlParamsForExistingSiteTesting Instructions (or ideally a Blueprint)
?plugin=friends?theme=flavor?plugin=friends&url=/wp-admin/options-general.phpnpx nx test playground-personal-wp --testFile=index.spec.ts