Opened 9 years ago
Last modified 7 weeks ago
#41341 new defect (bug)
Theme update notification appearing multiple times
| Reported by: | hardeepasrani | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Themes | Version: | 4.9 |
| Severity: | normal | Keywords: | shiny-updates has-patch has-unit-tests |
| Cc: | Focuses: | javascript, administration |
Description
So I went to my dashboard and there were 5-6 themes which were out of date. So I clicked on Update on all, and opened the model of one of the themes (see the picture if you're confused). And as the themes were getting updated, the update alert started to appear on the opened theme for all the themes.
Looks like a bug to me.
Attachments (1)
Change History (13)
#1
@
9 years ago
- Keywords needs-patch shiny-updates added
- Milestone Awaiting Review → Future Release
#9
@
5 months ago
Note: This issue affects every WordPress including 6.9.x, not only Version 4.9 as stated in issue details. It is and will be reported again and again, also because this 9 years old issue has wrong Version tag.
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
#11
in reply to: ↑ 8
@
5 months ago
#59538 was marked as a duplicate.
Note: This issue proposes some code for finding the correct element using the theme slug.
This ticket was mentioned in PR #11981 on WordPress/wordpress-develop by @sukhendu2002.
7 weeks ago
#12
- Keywords has-patch has-unit-tests added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/41341
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
#43596 was marked as a duplicate.