[wp-trac] [WordPress Trac] #54309: The "auto-updates enabled / disabled" filter links go missing
WordPress Trac
noreply at wordpress.org
Sat Feb 18 13:21:24 UTC 2023
#54309: The "auto-updates enabled / disabled" filter links go missing
-------------------------------------------------+-------------------------
Reporter: NekoJonez | Owner: audrasjb
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future
| Release
Component: Plugins | Version: 5.5
Severity: normal | Resolution:
Keywords: has-patch has-testing-info needs- | Focuses: ui,
testing | administration
-------------------------------------------------+-------------------------
Changes (by costdev):
* keywords: has-patch => has-patch has-testing-info needs-testing
Comment:
== Test Report
Patch tested: https://github.com/WordPress/wordpress-
develop/pull/4100.diff
**Please note**
These testing instructions are long to ensure that the patch works as
expected and doesn't introduce any backward compatibility breaks. Despite
being long, they have been written as step-by-step instructions to,
hopefully, make them easier to follow.
=== Setup
1. Create a new file at `wp-content/mu-plugins/test_54309.php` with the
following content:
{{{#!php
<?php
/**
* Plugin Name: Must-Use plugin for testing #54309.
* Description: This shows a Must-Use plugin in Plugins > Installed
plugins > Must-Use
* Author: WordPress Core Contributors
* Author URI: https://make.wordpress.org/core
* License: GPLv2 or later
* Version: 1.0.0
*/
}}}
2. Navigate to `Plugins > Add New`.
3. Install and activate the **User Role Editor**, **View Admin As** and
**Query Monitor** plugins.
4. Navigate to `Plugins > Installed Plugins` and click `Enable auto-
updates` beside **Query Monitor**.
5. Navigate to `Users > User Role Editor`.
6. Select **Contributor** from the dropdown, add the `activate_plugins`
and `update_plugins` capabilities, then click `Update` and `Yes` to
confirm`.
7. Select **Editor** from the dropdown, add the `activate_plugins`
capability, then click `Update` and `Yes` to confirm.
8. Select **Subscriber** from the dropdown, add the `update_plugins`
capability, then click `Update` and `Yes` to confirm.
=== Hints
- BC = Backward Compatibility (the patch doesn't break previous
functionality)
- 🐞 = A bug to be fixed.
- ✅ = The expected behaviour.
- Testing recommendations:
- First go through these steps without the patch, only paying attention
to the "Before the patch" and "Before and after the patch" sections.
- Apply the patch with this command:
{{{
grunt patch:https://github.com/WordPress/wordpress-develop/pull/4100.diff
}}}
- Then go through these steps again, but this time, only pay attention
to the "After the patch" and "Before and after the patch" sections.
- I appreciate that there are a lot of steps. Focus on one step at a
time.
=== Steps to Reproduce or Test
1. Navigate to the `Dashboard`.
2. At the top right of the admin bar, hover over `View As` and click
**Contributor**.
3. Navigate to `Plugins > Installed Plugins > Must-Use`.
a. Before the patch:
i. 🐞 The `Auto-updates Enabled` and `Auto-updates Disabled` view
links should not appear above the table.
ii. ✅ (BC) The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
b. After the patch:
i. ✅ The `Auto-updates Enabled` and `Auto-updates Disabled` views
should appear above the table.
ii. ✅ (BC) The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
4. Navigate to `Plugins > Installed Plugins > Drop-in`.
a. Before the patch:
i. 🐞 The `Auto-updates Enabled` and `Auto-updates Disabled` view
links should not appear above the table.
ii. ✅ (BC) The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
b. After the patch:
i. ✅ The `Auto-updates Enabled` and `Auto-updates Disabled` view
links should appear above the table.
ii. ✅ (BC) The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
=== Steps to test Backward Compatiblity more extensively
1. Set `define( 'AUTOMATIC_UPDATER_DISABLED', true );` in `wp-config.php`.
2. Navigate to `Plugins > Installed Plugins > Must-Use`.
a. Before and after the patch:
i. ✅ The `Auto-updates Enabled` and `Auto-updates Disabled` view
links should not appear above the table.
ii. ✅ The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
3. Navigate to `Plugins > Installed Plugins > Drop-in`.
a. Before and after the patch:
i. ✅ The `Auto-updates Enabled` and `Auto-updates Disabled` view
links should not appear above the table.
ii. ✅ The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
4. Remove `define( 'AUTOMATIC_UPDATER_DISABLED', true );` from `wp-
config.php`.
5. Navigate to the `Dashboard`.
6. At the top right of the admin bar, hover over `Viewing as Role:
Contributor` and click **Editor**.
7. Navigate to `Plugins > Installed Plugins`.
a. Before and after the patch:
i. ✅ You should be able to deactivate **Query Monitor** and re-
activate it.
8. Navigate to `Plugins > Installed Plugins > Must-Use`.
a. Before and after the patch:
i. ✅ The `Auto-updates Enabled` and `Auto-updates Disabled` view
links should not appear above the table.
ii. ✅ The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
9. Navigate to `Plugins > Installed Plugins > Drop-in`.
a. Before and after the patch:
i. ✅ The `Auto-updates Enabled` and `Auto-updates Disabled` view
links should not appear above the table.
ii. ✅ The `Enable auto-updates` and `Disable auto-updates` links
should not appear in the plugin row.
10. Navigate to the `Dashboard`.
11. At the top right of the admin bar, hover over `Viewing as Role:
Editor` and click **Subscriber**.
a. Before and after the patch:
i. ✅ The `Plugins` menu item should not appear.
12. Manually navigate to `/wp-admin/plugins.php`.
a. Before and after the patch:
i. ✅ You should receive a message that you cannot access the page.
:white_tick:
=== Steps to clean up your local environment
1. At the top right of the admin bar, hover over `Viewing as Role:
Subscriber` and select **Reset to default**.
2. Navigate to `Plugins > Installed plugins`. Deactivate and delete all
plugins.
3. Delete the file at `wp-content/mu-plugins/test_54309.php`.
4. Run this command to remove the patch:
{{{
git restore .
}}}
=== Expected Results
When reproducing a bug:
- ❌ All "Before the patch" items marked with 🐞 should occur.
- ✅ All "Before the patch" and "Before and after the patch" items marked
with ✅ should occur.
When testing a patch to validate it works as expected:
- ✅ All "After the patch" and "Before and after the patch" items marked
with ✅ should occur.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54309#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list