#54309 closed defect (bug) (fixed)
The "auto-updates enabled / disabled" filter links go missing
Reported by: | NekoJonez | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Plugins | Keywords: | has-patch has-testing-info has-screenshots commit |
Focuses: | ui, administration | Cc: |
Description (last modified by )
On the plugin page, when you click on "required" or "drop-in" plugins, the two filter links for "Auto-updates enabled" and "Auto-updates disabled" don't appear.
Without the links:
https://ibb.co/qmhCTcJ
With the links:
https://ibb.co/Tt9S8Bf
Attachments (1)
Change History (25)
#3
follow-up:
↓ 10
@
21 months ago
I believe the ticket description refers to the status links in the list table, rather than the plugin row toggle links.
The list table should indeed still show the Auto-updates enabled
and Auto-updates Disabled
links.
#5
@
21 months ago
- Milestone changed from Awaiting Review to 6.2
- Owner set to audrasjb
- Status changed from new to assigned
Moving to 6.2 for consideration and assigning @audrasjb who took ownership of the duplicate mentioned above.
#6
@
21 months ago
Looks like this may be intended behaviour.
- Ref 1 - The
auto-updates-enabled
andauto-updates-disabled
are only added to the array when$this->show_autoupdates
is truthy. - Ref 2 - Plugin data is only added to these keys if
$this->show_autoupdates
is truthy. - Ref 3 - The
$totals
array is populated. - Ref 4 - The totals are looped, which won't include the auto-update statuses.
- Ref 5 -
$this->show_autoupdates
is specifically tied tomustuse
anddropin
statuses.
If so, I'd suggest we change this behaviour. These navigation items should show regardless of the currently viewed status.
However, as shown by the references above, the protected
show_autoupdates
property is coupled to the list table's navigation and the Enable/Disable auto-updates
links that show in plugin rows. Extender sub-classes may use this, and may want to hide the list table navigation for Auto-updates. As always, we should be careful not to introduce an unintended BC break.
That said, I can't see any relevant usage in this search result.
@audrasjb what are your thoughts on this?
This ticket was mentioned in Slack in #core by costdev. View the logs.
20 months ago
#8
@
20 months ago
- Keywords needs-patch added
- Milestone changed from 6.2 to Future Release
As this ticket doesn't have a patch yet and the issue was not introduced in 6.2 (and may be expected behaviour), I'm moving this to Future Release
for investigation, and adding needs-patch
.
#9
@
20 months ago
- Description modified (diff)
- Summary changed from The "auto-updates enabled / disabled" buttons go missing to The "auto-updates enabled / disabled" filter links go missing
- Version set to 5.5
#10
in reply to:
↑ 3
@
20 months ago
Replying to costdev:
I believe the ticket description refers to the status links in the list table, rather than the plugin row toggle links.
The list table should indeed still show the
Auto-updates enabled
andAuto-updates Disabled
links.
The reasoning from #comment:3 still applies. Since auto-updates can't be enabled/disabled for plugins in either of these views, we specifically excluded outputting the view links.
I don't remember of there was an issue created in the repo for the feature plugin that would document that, maybe @audrasjb will remember.
#11
follow-ups:
↓ 12
↓ 13
@
20 months ago
After a little conversation with @costdev and little bit of investigation of the code he references in #comment:6, I now believe that while we specifically intended to hide the auto-update views when the the current view is Must Use
or Drop-in
that decision was incorrect...and this is, in fact, a bug.
I'll do a patch this evening.
#12
in reply to:
↑ 11
@
20 months ago
Replying to pbiron:
I now believe that while we specifically intended to hide the auto-update views when the the current view is
Must Use
orDrop-in
that decision was incorrect...and this is, in fact, a bug.
Good point, this is what probably happened, and I agree with you that this decision was not the best.
#13
in reply to:
↑ 11
@
20 months ago
Replying to pbiron:
I'll do a patch this evening.
I have a patch prepared, but am waiting for someone else to give it an initial test first (to make sure it doesn't introduce any regressions). Will do a PR tomorrow.
This ticket was mentioned in PR #4100 on WordPress/wordpress-develop by @pbiron.
20 months ago
#14
- Keywords has-patch added; needs-patch removed
#15
@
20 months ago
Simple testing instructions for the PR:
- Apply the PR
- Ensure you have at least 1
Must Use
plugin and 1Drop-in
plugin installed - Navigate to Plugins > Installed Plugins > Must use (
wp-admin/plugins.php?plugin_status=mustuse
) - Navigate to Plugins > Installed Plugins > Drop-in (
wp-admin/plugins.php?plugin_status=dropin
)
Verify that the Auto-updates Enabled/Disabled
views still appear in steps 3&4.
@costdev will shortly be adding more detailed testing (that check for BC) and he'll also be providing me with some unit tests (at which time I'll update the PR with those)
Colin is much better at writing testing instructions than I am ;-)
#16
@
20 months ago
- Keywords has-testing-info needs-testing added
Testing Instructions
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
- Create a new file at
wp-content/mu-plugins/test_54309.php
with the following content:<?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 */
- Navigate to
Plugins > Add New
. - Install and activate the User Role Editor, View Admin As and Query Monitor plugins.
- Navigate to
Plugins > Installed Plugins
and clickEnable auto-updates
beside Query Monitor. - Navigate to
Users > User Role Editor
. - Select Contributor from the dropdown, add the
activate_plugins
andupdate_plugins
capabilities, then clickUpdate
andYes
to confirm`. - Select Editor from the dropdown, add the
activate_plugins
capability, then clickUpdate
andYes
to confirm. - Select Subscriber from the dropdown, add the
update_plugins
capability, then clickUpdate
andYes
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
- Navigate to the
Dashboard
. - At the top right of the admin bar, hover over
View As
and click Contributor. - Navigate to
Plugins > Installed Plugins > Must-Use
.- Before the patch:
- 🐞 The
Auto-updates Enabled
andAuto-updates Disabled
view links should not appear above the table. - ✅ (BC) The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- 🐞 The
- After the patch:
- ✅ The
Auto-updates Enabled
andAuto-updates Disabled
views should appear above the table. - ✅ (BC) The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- ✅ The
- Before the patch:
- Navigate to
Plugins > Installed Plugins > Drop-in
.- Before the patch:
- 🐞 The
Auto-updates Enabled
andAuto-updates Disabled
view links should not appear above the table. - ✅ (BC) The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- 🐞 The
- After the patch:
- ✅ The
Auto-updates Enabled
andAuto-updates Disabled
view links should appear above the table. - ✅ (BC) The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- ✅ The
- Before the patch:
Steps to test Backward Compatiblity more extensively
- Set
define( 'AUTOMATIC_UPDATER_DISABLED', true );
inwp-config.php
. - Navigate to
Plugins > Installed Plugins > Must-Use
.- Before and after the patch:
- ✅ The
Auto-updates Enabled
andAuto-updates Disabled
view links should not appear above the table. - ✅ The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- ✅ The
- Before and after the patch:
- Navigate to
Plugins > Installed Plugins > Drop-in
.- Before and after the patch:
- ✅ The
Auto-updates Enabled
andAuto-updates Disabled
view links should not appear above the table. - ✅ The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- ✅ The
- Before and after the patch:
- Remove
define( 'AUTOMATIC_UPDATER_DISABLED', true );
fromwp-config.php
. - Navigate to the
Dashboard
. - At the top right of the admin bar, hover over
Viewing as Role: Contributor
and click Editor. - Navigate to
Plugins > Installed Plugins
.- Before and after the patch:
- ✅ You should be able to deactivate Query Monitor and re-activate it.
- Before and after the patch:
- Navigate to
Plugins > Installed Plugins > Must-Use
.- Before and after the patch:
- ✅ The
Auto-updates Enabled
andAuto-updates Disabled
view links should not appear above the table. - ✅ The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- ✅ The
- Before and after the patch:
- Navigate to
Plugins > Installed Plugins > Drop-in
.- Before and after the patch:
- ✅ The
Auto-updates Enabled
andAuto-updates Disabled
view links should not appear above the table. - ✅ The
Enable auto-updates
andDisable auto-updates
links should not appear in the plugin row.
- ✅ The
- Before and after the patch:
- Navigate to the
Dashboard
. - At the top right of the admin bar, hover over
Viewing as Role: Editor
and click Subscriber.- Before and after the patch:
- ✅ The
Plugins
menu item should not appear.
- ✅ The
- Before and after the patch:
- Manually navigate to
/wp-admin/plugins.php
.- Before and after the patch:
- ✅ You should receive a message that you cannot access the page. :white_tick:
- Before and after the patch:
Steps to clean up your local environment
- At the top right of the admin bar, hover over
Viewing as Role: Subscriber
and select Reset to default. - Navigate to
Plugins > Installed plugins
. Deactivate and delete all plugins. - Delete the file at
wp-content/mu-plugins/test_54309.php
. - 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.
#17
@
20 months ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/4100.diff
Environment
- Server: Apache (Linux)
- WordPress: 6.2-beta2-55340-src
- Browser: Chrome 110.0.0.0
- OS: Windows 10
- Theme: Twenty Twenty-One
- Plugins:
Must-Use plugin for testing #54309 1.0.0
Query Monitor 3.11.1
User Role Editor 4.63.2
View Admin As 1.8.8
Actual Results
When reproducing a bug:
- ❌ All "Before the patch" items marked with 🐞 occurred. Issue reproduced.
- ✅ All "Before the patch" and "Before and after the patch" items marked with ✅ occurred.
When testing a patch to validate it works as expected:
- ✅ All "After the patch" and "Before and after the patch" items marked with ✅ occurred.
- ✅ Testing on a Multisite network showed it's own expected behaviour before and after the patch.
- ✅ Issue resolved with the patch.
- ✅ No backward compatibility breaks detected.
This ticket was mentioned in Slack in #core-test by pbiron. View the logs.
20 months ago
This ticket was mentioned in Slack in #core-test by costdev. View the logs.
20 months ago
This ticket was mentioned in Slack in #core by nekojonez. View the logs.
16 months ago
#21
@
16 months ago
- Milestone changed from Future Release to 6.3
As per today's bug scrub, moving this to 6.3 and self assigning for final review.
#22
@
16 months ago
- Keywords has-screenshots commit added; needs-testing removed
I tested the proposed patch successfully. Marking for commit
.
@audrasjb commented on PR #4100:
16 months ago
#24
Committed in https://core.trac.wordpress.org/changeset/55903
Thanx for the ticket @NekoJonez.
The reason the
Enable/Disable auto-updates
links don't appear forMust-Use
andDrop-in
plugins is that those plugins never receive auto-updates...so having the links wouldn't make sense.