#53710 closed defect (bug) (fixed)
WP Update notice shown twice
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | has-screenshots has-patch commit |
Focuses: | Cc: |
Description
On updates (wp-admin/update-core.php) the message to update manually to a new localised version is shown twice.
Expected behaviour would be to show the message only once and then also show a message about the possibility to update to the US version manually.
Original phrase:
"You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:"
Attachments (5)
Change History (13)
#1
@
4 years ago
- Component changed from Administration to Upgrade/Install
- Milestone changed from Awaiting Review to 5.9
- Owner set to audrasjb
- Status changed from new to accepted
#2
@
3 years ago
- Keywords has-patch added; needs-patch removed
Hi,
After taking a look to the list_core_update()
function pointed by @audrasjb , it seems that the if statement on line 43 fails when $update->locale
is 'en_US' and get_locale()
is different than 'en_US'. By the way, update button has the correct locale, only the message is wrong.
I add an elseif
statement (which works too with a else
statement) to set $version_string
working for a non-en_US locale when displaying 'en_US' update.
Could someone check if everything is ok ?
Thanks
#3
@
3 years ago
- Keywords commit added
I tested the patch and it fixes the issue. Thanks @benjamingosset I'm marking this as ready for commit
.
Good point.
I suspect this is because the
list_core_update()
function is called two times, inside a foreach loop.https://build.trac.wordpress.org/browser/trunk/wp-admin/update-core.php?marks=140#L222