Opened 15 months ago
Last modified 5 months ago
#62212 new defect (bug)
Plugin update via modal does not update plugins list until page reload
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 6.5 |
| Component: | Plugins | Keywords: | needs-patch |
| Focuses: | administration | Cc: |
Description
If you visit the "Plugins" page in the admin section and there is a plugin update available, the following text will be displayed:
There is a new version of [the plugin's name] available. View version [the plugin's latest version] details or update now.
If you click the "View version ... details" link, a modal dialog box (using an iframe) will be displayed with a button to perform the update.
Before WordPress 6.5, this button was labeled "Install Update Now". If you clicked the button, the modal would close, the text on the main page would change to "Updating..." and then finally this text would change to "Updated!" when the update was completed.
In WordPress 6.5 and later, the button is labeled "Update Now" (and has a different appearance). If you click the button, the modal does not close, but the text on the button changes to "Updating..." and then finally "Updated!" If you close the modal, you will see that the main page has not changed at all: the plugin still displays the old version with the same "There is a new version of [the plugin's name] available..." text. You have to manually reload the page in order to see that the plugin has been updated to the new version.
Is this behavior intentional? Probably the change in the button label and appearance was intentional (but that's not very important). Keeping the modal open during the update might be intentional (although I preferred the old behavior). But failing to update the main page seems like a bug, or at least a significant regression in functionality compared to earlier versions.
Change History (3)
#2
@
5 months ago
- Keywords needs-patch added
Reproduction Report
Description
✅ This report validates that the issue can be reproduced.
Environment
- WordPress: 6.8.2
- PHP: 8.4.10
- Server: nginx/1.26.1
- Database: mysqli (Server: 8.0.35 / Client: mysqlnd 8.4.10)
- Browser: Chrome 139.0.0.0
- OS: Windows 10/11
- Theme: ModernPress 1.0.0
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
- WP Crontrol 1.19.1
Testing Instructions
- Install a plugin where a new version is available.
- Navigate to Plugins > Installed Plugins in the admin.
- Click the "View version … details" link for the plugin update.
- In the modal popup, click the Update Now button.
- Wait for the button state to change from Updating… to Updated!.
- Close the modal.
Actual Results
- ✅ Error condition occurs (reproduced).
- After closing the modal, the plugins list still shows the old version along with the “There is a new version…” update notice.
- The page must be manually refreshed to display the updated version.
Additional Notes
In previous versions (≤ 6.4), the modal would close after clicking Install Update Now, and the list table was updated automatically without a manual reload.
Note that the old JavaScript code for handling the click on the "Install Update Now" button was never removed - it is still present in 6.5 and later (including the latest trunk version), even though the code never gets executed any more.
https://github.com/WordPress/wordpress-develop/blob/6e7acb0103ce64bcd0b66d22cb0efb6249028004/src/js/_enqueues/wp/updates.js#L3212
That is just dead code now, since the
plugin_update_from_iframeID no longer exists.