Opened 4 weeks ago
Closed 3 weeks ago
#64614 closed defect (bug) (duplicate)
Theme updated message shown in wrong context
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Themes | Keywords: | |
| Focuses: | Cc: |
Description
When updating a theme and switching to other theme details during update, the updated message is shown in context of current visible other theme details after update in background is finished.
Attachments (3)
Change History (7)
#3
@
4 weeks ago
Took a look at some code.
wp.updates.updateThemeSuccess() in wp-admin/js/updates.js at about line 1600 tries to figure out the selector of target element for the update message.
It uses $notice = $( '.theme-info .notice' ) and obviously gets the element(s) in currently shown context, no matter if or which theme details currently are shown.
The actually updated theme slug would be available in response.slug but the DOM of theme details appears to not have the slug anywhere - or maybe I missed it.
So the suggested fix would be:
- add theme slug to DOM of each theme details
- use
response.slugto find target element for the update message - make sure only one
.theme-info .noticeis in theme details or use more specific selector to avoid showing message multiple times
#4
@
3 weeks ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #41341.
Hi
This is a duplicate of https://core.trac.wordpress.org/ticket/41341 so I am closing this ticket.
As you can see in the screenshots, the update message appears twice. I think it's best to remove these messages completely when you leave the screen of the triggering plugin.