#60521 closed defect (bug) (fixed)
Plugin updates from the plugin row don't work anymore
Reported by: | Presskopp | Owned by: | costdev |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | Plugins | Keywords: | has-screenshots has-patch has-testing-info commit |
Focuses: | Cc: |
Description
Using a dev environment (6.5-alpha-57604) and updating any plugin on /wp-admin/plugins.php it won't work, throwing a console error. Coming from wp-admin/plugin-install.php it's still working.
Attachments (3)
Change History (15)
#2
@
8 months ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 6.5
- Version set to trunk
#3
@
8 months ago
This is caused by a minor mistake that I made when calling the setCardButtonStatus()
JS function. I mistakenly forgot to guard this to make sure the current page was one of the plugin install pages.
Should be a very simple fix. Patch incoming.
This ticket was mentioned in PR #6098 on WordPress/wordpress-develop by @costdev.
8 months ago
#4
Previously, the setCardButtonStatus()
JS function was called when a card had the ID plugin-information-footer
. However, the card will only exist on plugin install pages. This caused a failure when updating plugins from the plugin row on plugins.php
due to an undefined card.
This adds a guard to ensure that the current page is one of the plugin install pages, preventing the error and allowing plugin updates from the plugins.php
rows to work as expected.
#5
@
8 months ago
- Keywords needs-testing has-testing-info added
PR 6098 makes the change mentioned above and is ready for testing.
Testing Instructions
These steps define how to reproduce the issue, and indicate the expected behavior.
Steps to Reproduce
- Have a plugin that requires an update.
- Navigate to
Plugins > Installed plugins
. - 🐞 Click
Update now
in the plugin row notice. - Apply the PR.
- Build the environment with
npm run build:dev
. - Repeat steps 1-3, ensuring you do a hard refresh between steps 2 and 3.
Expected Results
When testing a patch to validate it works as expected:
- ✅ The update completes successfully and there are no errors in the console.
When reproducing a bug:
- ❌ The update stalls and the DevTools console will have an error:
Uncaught TypeError: Cannot read properties of undefined. (reading "attr")
This ticket was mentioned in Slack in #core-test by costdev. View the logs.
8 months ago
#7
@
8 months ago
- Summary changed from Plugin updates don't work anymore to Plugin updates from the plugin row don't work anymore
#8
@
8 months ago
Test Report
Description
Patch tested: PR 6098
Environment
- WordPress: 6.5-alpha-56966-src
- PHP: 8.2.15
- Server: nginx/1.25.3
- Database: mysqli (Server: 8.0.36 / Client: mysqlnd 8.2.15)
- Browser: Chrome 121.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Four 1.0
- MU Plugins: None activated
- Plugins:
- Test Reports 1.0.1
Actual Results
✅ Issue resolved with patch.
Screenshots
Before Apply Patch | After Apply Patch ✅ |
#9
@
8 months ago
Cross verified the given PR with WordPress local setup.
Test Report
Description : After pulling the code from the given PR, I was successfully able to update the plugin without any console errors.
This report validates whether the indicated patch works as expected.
Patch tested with PR: https://github.com/WordPress/wordpress-develop/pull/6098
Environment
- WordPress: 6.5-alpha-56966-src
- PHP: 8.2.15
- Server: nginx/1.25.3
- Database: mysqli (Server: 8.0.36 / Client: mysqlnd 8.2.15)
- Browser: Chrome 121.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Four 1.0
- MU Plugins: None activated
- Plugins:
- Hello Dolly 1.7.2
- Test Reports 1.1.0
Actual Results
✅ Issue resolved with patch.
#10
@
8 months ago
- Keywords commit added; needs-testing removed
Patch: https://github.com/WordPress/wordpress-develop/pull/6098
I too can reproduce the bug and the patch resolves it.
Left a minor nit on the PR, though not a blocker.
Marking for commit
.
see also discussion on slack with @costdev https://wordpress.slack.com/archives/C02RQBWTW/p1707811928184429