wordpress-playground icon indicating copy to clipboard operation
wordpress-playground copied to clipboard

[Query API] Multiple `plugin` params are rewritten to include only last plugin

Open ironprogrammer opened this issue 1 year ago • 0 comments

Issue description

When multiple plugin options are specified with the Query API, e.g. plugin=classic-editor&plugin=hello-dolly&plugin=plugin-check, during load the URL is rewritten to include only the last plugin specified (in this case, plugin=plugin-check). For instance:

Requesting https://playground.wordpress.net/?php=8.2&wp=6.6&networking=yes&plugin=classic-editor&plugin=hello-dolly&plugin=plugin-check&url=/wp-admin/plugins.php turns into https://playground.wordpress.net/?php=8.2&wp=6.6&networking=yes&plugin=plugin-check&url=%2Fwp-admin%2Fplugins.php once the Playground has loaded.

Note that going back in browser history (tested in Safari) returns the address bar URL to the original request, but doesn't reload the page.

What I expected

That the original URL would retain the options originally selected, and can be copied to share or use elsewhere.

Why it matters

Sometimes a little tinkering is required when setting up a Playground with the Query API. Over the course of applying these tweaks, at some point you may wish to copy the final URL. URL encoding aside, the options in the copied link should match what's expected.

ironprogrammer avatar Oct 24 '24 20:10 ironprogrammer