Opened 6 months ago
Last modified 5 weeks ago
#62788 new enhancement
Update request for 'Deleting...' string after failed Ajax attempt
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | trivial | Version: | 6.7.1 |
Component: | Plugins | Keywords: | has-patch has-test-info dev-feedback |
Focuses: | administration | Cc: |
Description
please see attached image
Attachments (5)
Change History (19)
#2
@
6 months ago
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
- WordPress: 6.8-alpha-59274-src
- PHP: 8.2.26
- Server: nginx/1.27.3
- Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
- Browser: Chrome 131.0.0.0
- OS: macOS
- Theme: Twenty Nineteen 3.0
- MU Plugins: None activated
- Plugins: Test Reports 1.2.0
Actual Results
✅ Error condition occurs (reproduced).
Supplemental Artifacts
Video: https://utfs.io/f/PL8E4NiPUWyOm5BNZZklrLsNmfguwi69VUazeO2chToFXQKn
This ticket was mentioned in PR #8855 on WordPress/wordpress-develop by @vrishabhsk.
6 weeks ago
#3
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/62788
#4
@
6 weeks ago
Hi @ignatiusjeroe, I have attached the patch and also raised the PR for the fix. Let me know if it works or needs additional changes. I will be attaching the before and after screencasts as well.
#5
@
6 weeks ago
- Keywords changes-requested added
Test Report
Description
❌ This report can't validates the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8855.diff
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty 2.9
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
- WP Dummy Content Generator 4.0.0
- WP Mail SMTP 4.4.0
Testing Instructions
- Tested using this: https://utfs.io/f/PL8E4NiPUWyOm5BNZZklrLsNmfguwi69VUazeO2chToFXQKn
Expected Results
- Downloading disappear after error.
Actual Results
- ❌ Issue not resolved with patch.
Additional Notes
- @vrishabhsk check the video instructions to see why the patch is not working.
#6
follow-up:
↓ 7
@
6 weeks ago
hi @SirLouen, you have tested for offline condition. The patch is for when the user does not have permission to delete the plugin and the alert is produced : https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/includes/ajax-actions.php#L4736
On line 4736, you can remove the ! for testing purposes and see that the patch will work. Apologies for not mentioning the test scenario. Let me know if im mistaken. Thanks
#7
in reply to:
↑ 6
@
6 weeks ago
Replying to vrishabhsk:
hi @SirLouen, you have tested for offline condition. The patch is for when the user does not have permission to delete the plugin and the alert is produced : https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/includes/ajax-actions.php#L4736
On line 4736, you can remove the ! for testing purposes and see that the patch will work. Apologies for not mentioning the test scenario. Let me know if im mistaken. Thanks
Can you try to sort all conditions in one shot?
#9
@
6 weeks ago
hi @SirLouen. I have attached the latest patch that should resolve the issue for all instances of this bug when the plugin deletion fails
Let me know if you find any issues with this. Thanks
#10
@
6 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/62788/62788-new.patch
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 136.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins: Test Reports 1.2.0
Actual Results
- ✅ Reverting “Deleting” back to “Delete” after a failed AJAX request due to network failure.
- ❌ Removing the Deletion failed notice on Successful deletion
Additional Notes
Thanks for updating the patch, @vrishabhsk. I’ve tested it, if removing the notice after a successful deletion is the expected behavior, it looks like the issue still persists. Functionally, everything else is working well.
Supplemental Artifacts
Video: https://rioudcpuyg.ufs.sh/f/PL8E4NiPUWyOwGqVTflBwjlD9K4qhAts3a26Vvd1rSI0xfio
#11
@
6 weeks ago
Hi @sainathpoojary, Thanks for the confirmation.
- The Admin notice is dismissible and can cleared manually.
- The scope of this ticket is to revert the
delete
button text back to its original text when the deletion operation fails. - It should not be stuck at
deleting...
#12
@
6 weeks ago
@sainathpoojary you should have tried, dismissing the notice before successfully deleting because it appears that the notice was added from the previous error (and you did not dismiss it in the video after the second try, so it persisted)
Can you retry?
#13
@
5 weeks ago
Thanks for the clarification, @vrishabhsk and @SirLouen.
I’ve retested the patch after manually dismissing the error notice before performing a successful deletion. Everything is now working as expected:
- ✅ The “Deleting” button text correctly reverts back to “Delete” when a deletion fails.
- ✅ The “Deletion failed” notice does not persist after a successful deletion when previously dismissed.
Everything looks good now. ✅
BTW, if a second attempt is made by clicking on the 'Deleting...' link, the error message isnt removed. It makes more sense for the script to first remove any error messages prior to sending a new Ajax request. With this rather small feedback mechanism you have the impression that your request was actually registered.