[wp-trac] [WordPress Trac] #61330: Plugin Dependencies: Refresh plugin-install.php instead of redirecting on activation
WordPress Trac
noreply at wordpress.org
Thu Jun 6 15:39:06 UTC 2024
#61330: Plugin Dependencies: Refresh plugin-install.php instead of redirecting on
activation
-------------------------------------------------+-------------------------
Reporter: jorbin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.6
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing has- | Focuses:
testing-info | administration
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* keywords: has-patch needs-testing => has-patch needs-testing has-
testing-info
Comment:
= Testing Instructions
These steps define how to reproduce the issue, and indicate the expected
behavior.
== Set up
Patch: https://github.com/WordPress/wordpress-develop/pull/6732
Note: After applying the patch, it needs to be built (i.e. to build the JS
and its minified version) which is done by:
{{{
npm install
npm run build:dev
}}}
== Notes
* The Add Plugins UI is `wp-admin/plugin-install.php` URL.
* The browser's native "Go back" arrow `←` or button is typically to the
left of the URL search field.
* Try different combinations of plugins and activate > install workflows.
* Try testing in single sites and, if possible, in multisite environments.
== Test 1: Steps to test for a plugin without autoredirect and no
dependencies
1. Navigate to Plugins > Add New Plugin.
2. In the plugins search box, type the name of the plugin to test (e.g.
`Contact Form 7`) and press enter. The UI should populate with that and
associated plugins.
3. In the plugin's card, press the "Install" button.
4. Once installed, then press the "Activate" button.
5. Once activated, then navigate to Plugins > Installed Plugins and
deactivate the plugin.
6. Repeat steps 1-3 except in step 3, click the "More Details" link the
plugin's card to open a modal. Steps 3-4 (Install and Activate) will be
done in the modal.
**Expected Results:**
* The plugin should activate and the button should show the status of
`Active`.
* After activation, the page should refresh / reload, but not redirect
(i.e. it'll reload to stay on the Add Plugins UI).
== Test 2: Steps to test for a plugin with autoredirect but no
dependencies
Please deactivate and delete the plugins installed from previous tests.
1. Navigate to Plugins > Add New Plugin.
2. In the plugins search box, type the name of the plugin to test (e.g.
`OptinMoster` or `Yoast SEO`) and press enter. The UI should populate
with that and associated plugins.
3. In the plugin's card, press the "Install" button.
4. Once installed, then press the "Activate" button.
5. After activation and redirect, use your browser's "Go back"
arrow/button to return.
6. Then navigate to Plugins > Installed Plugins and deactivate the plugin.
7. Repeat steps 1-6 except in step 3, click the "More Details" link the
plugin's card to open a modal. Steps 3-4 (Install and Activate) will be
done in the modal.
**Expected Results:**
* After activation, the plugin's setup wizard should load.
* In your browser, using its "Go back" arrow or button should (in one-
click) return you to the Add Plugins UI.
* Upon returning to the Add Plugins UI, the plugin's status should show
`Active`.
== Test 3: Steps to test for a plugin without autoredirect when it
requires another plugin with autodirect
Please deactivate and delete the plugins installed from previous tests.
Examples:
* Main plugin (without autoredirect): WooCommerce Stripe Payment Gateway
* Dependent plugin (with autoredirect): WooCommerce
Steps:
1. Navigate to Plugins > Add New Plugin.
2. In the plugins search box, type the name of the plugin to test (e.g.
`woocommerce`) and press enter. The UI should populate with that and
associated plugins.
3. In the "Additional plugins are required" section, activate the "More
Details" link to open the modal.
4. In the modal, press the "Install" button.
5. Once installed, then press the "Activate" button.
6. After activation and redirect, use your browser's "Go back"
arrow/button to return.
7. In the plugin's card, press the "Install" button.
8. Once installed, press the "Activate" button.
9. Then navigate to Plugins > Installed Plugins and deactivate the plugin.
7. Repeat steps 7-8 except in step 7, click the "More Details" link the
plugin's card to open a modal. Steps 7-8 (Install and Activate) will be
done in the modal.
**Expected Results:**
For the dependent plugin (e.g. WooCommerce):
* After activation, its setup wizard should load.
* In your browser, using its "Go back" arrow or button should (in one-
click) return you to the Add Plugins UI.
* Upon returning to the Add Plugins UI, the plugin's status should
show `Active`.
For the main plugin (e.g. WooCommerce Stripe Payment Gateway):
* After activation, the Add Plugins UI page should reload.
* After reloading, the plugin's status should show `Active`.
== Test 4: Steps to test for a plugin with autoredirect when it requires
another plugin with autodirect
Please deactivate and delete the plugins installed from previous tests.
Examples:
* Main plugin (with autoredirect): Google Listings & Ads
* Dependent plugin (with autoredirect): WooCommerce
Steps:
1. Navigate to Plugins > Add New Plugin.
2. In the plugins search box, type the name of the plugin to test (e.g.
`woocommerce`) and press enter. The UI should populate with that and
associated plugins.
3. In the "Additional plugins are required" section, activate the "More
Details" link to open the modal.
4. In the modal, press the "Install" button.
5. Once installed, then press the "Activate" button.
6. After activation and redirect, use your browser's "Go back"
arrow/button to return.
7. In the plugin's card, press the "Install" button.
8. Once installed, press the "Activate" button.
9. Then navigate to Plugins > Installed Plugins and deactivate the plugin.
7. Repeat steps 7-8 except in step 7, click the "More Details" link the
plugin's card to open a modal. Steps 7-8 (Install and Activate) will be
done in the modal.
**Expected Results:**
For the dependent plugin (e.g. WooCommerce):
* After activation, its setup wizard should load.
* In your browser, using its "Go back" arrow or button should (in one-
click) return you to the Add Plugins UI.
* Upon returning to the Add Plugins UI, the plugin's status should
show `Active`.
For the main plugin (with autoredirect) (e.g. Google Listings & Ads):
* After activation, should redirect to its setup wizard or main setup
page.
* In your browser, using its "Go back" arrow or button should (in one-
click) return you to the Add Plugins UI.
* Upon returning to the Add Plugins UI, the plugin's status should
show `Active`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61330#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list