#57999 closed defect (bug) (fixed)
Don't show error message when there is nothing to update
Reported by: | Presskopp | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | good-first-bug has-patch has-screenshots has-testing-info commit |
Focuses: | administration, ui-copy | Cc: |
Description
If either
wp-admin/update-core.php?action=do-plugin-upgrade
or
wp-admin/update-core.php?action=do-theme-upgrade
is called directly and if there is nothing to be updated, still an error is shown:
Please select one or more plugins to update.
or
Please select one or more themes to update.
Let's not show the error anymore.
Attachments (11)
Change History (44)
#2
@
21 months ago
- Component changed from Administration to Upgrade/Install
- Focuses administration ui-copy added
The error message is inappropriate when there are no updates to select, though I think it might be worth adding an info notice in this case. I used existing text strings.
#3
@
21 months ago
FYI: I decided to not put any notice in, because down on the page it already tells us that there are no updates. :-)
#4
@
21 months ago
It might help to know the ways to get the theme/plugin update action for that page other than typing or pasting it in the address bar.
I know of one other way, for which the notice would not help much:
- Go to the Updates page.
- Select all plugins or all themes and click the button to update them.
- Wait for the updates to complete.
- Navigate to another page.
- Use the browser's Back button and refresh the page.
This ticket was mentioned in Slack in #core by presskopp. View the logs.
20 months ago
#7
@
20 months ago
- Milestone changed from Awaiting Review to 6.3
- Owner set to pbiron
- Status changed from new to assigned
#8
@
20 months ago
57999.1.diff is a slight mod of 57999.diff. The difference prevents a stray </p></div>
from being output when there are no updates available.
#9
@
20 months ago
One downside of the approach in 57999.1.diff and 57999.diff is they can result in get_{theme|plugin}_updates()
being called twice on the same page load of update-core.php
(this was pointed out to me by @costdev.
I've looked for a way to prevent those multiple calls, but as far as I can tell, that would take a major refactoring of the flow in update-core.php
and I don't think that's worth it. If someone else thinks they know an easy to do so, then I'm all ears.
This ticket was mentioned in Slack in #core-upgrade-install by pbiron. View the logs.
19 months ago
This ticket was mentioned in Slack in #core by pbiron. View the logs.
19 months ago
This ticket was mentioned in Slack in #design by pbiron. View the logs.
19 months ago
This ticket was mentioned in Slack in #core-upgrade-install by pbiron. View the logs.
19 months ago
#17
@
19 months ago
I’m not sure the notice really adds anything except to emphasize that something didn’t happen.
This ticket was mentioned in Slack in #core-upgrade-install by pbiron. View the logs.
19 months ago
#20
@
19 months ago
We discussed this ticket during the component meeting earlier today.
Based on feedback we received from the #design team, the consensus of those at the meeting is that:
- yes, the current error notice should be removed (and not replaced with an info notice)
- we still need to evaluate whether the slight performance hit of calling
get_{plugin|theme_updates()
twice as in 57999.1.diff is a problem or not (see #comment:9). One possible way to reduce the performance hit was discussed during the meeting, but it would be out of scope for this ticket (but certainly a good candidate for another ticket)
To summarize, it's looking good that we'll be able to commit this for 6.3.
This ticket was mentioned in Slack in #core-upgrade-install by pbiron. View the logs.
19 months ago
#22
@
19 months ago
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/57999/57999.1.diff
Environment
- OS: Windows 11 (22H2)
- Web Server: nginx/1.23.4
- PHP: 7.4.33
- WordPress: 6.3-alpha-55505-src
- Browser: Chrome Version 113.0.5672.126 (Official Build) (64-bit)
- Theme: Twenty Twenty-Three
Before Applying The Patch
- Followed the instructions of @sabernhardt
- ✅ Error message does show up after updating the plugins
After Applying The Patch
- Followed the same instructions
- ✅ Error message does not show up after updating the plugins
Plugins Used
- wordpress-seo.20.4
- all-in-one-wp-migration.7.70
Special thanks to @costdev for helping me out regarding applying patches!
This ticket was mentioned in Slack in #core-test by zunaid321. View the logs.
19 months ago
#24
@
19 months ago
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/57999/57999.1.diff
Environment
- OS: macOS 12.3.1
- WordPress: 6.3-alpha-55828
- PHP: 8.1.1
- Server: Apache/2.4.46 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.0.2u mod_wsgi/3.5 Python/2.7.13
- Database: mysqli (Server: 5.7.34 / Client: mysqlnd 8.1.1)
- Browser: Edge 107.0.1418.28 (macOS)
- Theme: Twenty Twenty-Three 1.1
- MU-Plugins: None activated
- Plugins:
- WordPress Beta Tester 3.3.8
Actual Results
- ✅ Issue resolved with the patch.
Additional Notes
- Tested with All Plugins and themes updated and then again a theme with an older version and it also validates the warning to update the older version theme
Supplemental Artifacts
Plugins Upgrade Before Patch: https://prnt.sc/jr9kMGCj9Yb4
Plugins Upgrade After Patch: https://prnt.sc/kZR7qcoBdUDp
Themes Upgrade Before Patch: https://prnt.sc/1ZFEgHeN8MyP
Themes Upgrade After Patch: https://prnt.sc/Lv_xYox3tDUV
Themes Upgrade After Patch with one theme to be updated: https://prnt.sc/A57XQvpkFvmQ
This ticket was mentioned in Slack in #core-test by shuvoaftab. View the logs.
19 months ago
#26
@
19 months ago
Bug Report
Description
Don't show error message when there is nothing to update
Environment
- WordPress: 6.3-alpha-55848
- PHP: 8.0.0
- Server: Apache/2.4.10 (Debian)
- Database: mysqli (Server: 5.5.59-MariaDB-1~wheezy / Client: 5.5.62)
- Browser: Chrome 113.0.0.0 (macOS)
- Theme: Twenty Twenty-Three 1.1
- MU-Plugins: None activated
- Plugins:
- Akismet Anti-Spam: Spam Protection 5.1
- All-in-One WP Migration 7.74-7-g3a9c5abd
- All-in-One WP Migration S3 Extension 3.75-2-g1815870
- WordPress Beta Tester 3.4.0
Steps to Reproduce
- If either wp-admin/update-core.php?action=do-plugin-upgrade or wp-admin/update-core.php?action=do-theme-upgrade is called directly and if there is nothing to be updated, still an error is shown: Please select one or more plugins to update. or Please select one or more themes to update.
- 🐞 Bug occurs.
Expected Results
- ✅ Issue resolved with the patch ;
Patch tested: https://core.trac.wordpress.org/attachment/ticket/57999/57999.1.diff
Actual Results
- ❌ Should add https://core.trac.wordpress.org/attachment/ticket/57999/57999.1.diff to the upcoming WordPress Version to work smoothly.
This ticket was mentioned in Slack in #core-upgrade-install by costdev. View the logs.
18 months ago
#28
@
18 months ago
The patch has a space before the semicolon following both get_theme_updates()
and get_plugin_updates()
. Those spaces probably could be removed while during the commit process.
This ticket was mentioned in PR #4743 on WordPress/wordpress-develop by @costdev.
18 months ago
#29
Previously, when the do-plugin-upgrade
or do-theme-upgrade
actions were accessed directly on update-core.php
, an error message stating "Select one or more (plugins|themes) to update" would be shown even if there was nothing to update.
This ensures that the error message only appears when there is something to update.
#30
@
18 months ago
- Keywords commit added; needs-testing removed
PR 4743 updates the previous patch to remove some errant spaces before semi-colons and verifies that no related CI job fails.
With two successful test reports, I'm removing needs-testing
and adding for commit
consideration.
@audrasjb commented on PR #4743:
18 months ago
#33
committed in https://core.trac.wordpress.org/changeset/56106
Adding a notice instead of an error if there are no updates