Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51976 closed defect (bug) (fixed)

Core update footer displays incorrect message when on current release -- sometimes

Reported by: afragen's profile afragen Owned by: afragen's profile afragen
Milestone: 5.7 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch has-screenshots commit
Focuses: ui Cc:

Description

When the user is on the current release, but is set to receive nightlies, via the Beta Tester plugin or otherwise, the footer message will be You are using a development version... technically this is incorrect.

In wp-admin/includes/update.php core_update_footer() --
It displays because the $cur->response is development. I propose that the message be changed under these conditions to Your next update will be to a development version...

Attachments (5)

51976.diff (1.0 KB) - added by afragen 4 years ago.
core-update-footer.png (20.8 KB) - added by afragen 4 years ago.
51976.2.diff (2.1 KB) - added by afragen 4 years ago.
simplified footer
simple footer.png (13.5 KB) - added by afragen 4 years ago.
51976.3.diff (1.2 KB) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (22)

@afragen
4 years ago

#1 @pbiron
4 years ago

This ticket came about from a conversation Andy and I were having last night.

Suppose I'm running 5.6 and have configured core updates to only happen for RCs (either with the Beta Tester plugin or by define( 'WP_AUTO_UPDATE_CORE', 'rc' ). As it stands, for several months the footer will show You are using a development version (5.6). Cool! which is not true (it might as well say The moon is made of green cheese. :-).

Previously, that incorrect message would only show for at most 12 hours (when the next auto-update happens and then the site would be on trunk). But now with the ability to only auto-update to betas and/or RCs it could be showing for much longer...and the string should be corrected.

51976.diff looks good to me.

The only suggestion would be to, maybe, use the logic from the Beta Tester plugin to show what the "next development version" will be based on the current settings. That is, Beta Tester (in it's Settings screen shows: version 5.7-RC1, or 5.7, whichever is released first.). Not sure if that's worth the trouble, but something to consider.

#2 @azaozz
4 years ago

  • Focuses ui added
  • Keywords 2nd-opinion added

Hmm, not sure 51976.diff is a good idea. The version in the footer is for the currently running code, not what it may be in the future. The settings (for the future updates) are/should be on the Updates screen :)

As it stands, for several months the footer will show You are using a development version (5.6). Cool! which is not true

Right, should be fixed to show what the current version is. Also thinking, after the Updates screen changes, the word "development" may not belong there. A simple: WordPress version 1.2.3 or WordPress version 4.5-beta6 would be simpler and better imho. If it is a dev. version that will be clearly visible from the $wp_version string.

Version 1, edited 4 years ago by azaozz (previous) (next) (diff)

#3 @pbiron
4 years ago

Yeah, I never really seen the need for the existing wording that mentions that the current version is a dev version...the version number itself does that.

So maybe the only thing that should be different in the footer for dev versions is including the Stay updated link if $cur->response === 'development.

This ticket was mentioned in Slack in #core by afragen. View the logs.


4 years ago

This ticket was mentioned in Slack in #core-auto-updates by audrasjb. View the logs.


4 years ago

@afragen
4 years ago

simplified footer

@afragen
4 years ago

#6 @afragen
4 years ago

  • Milestone changed from Awaiting Review to 5.7
  • Owner set to afragen
  • Status changed from new to accepted

#7 @afragen
4 years ago

Remind me not to try and change the status again -- anywhere.

This ticket was mentioned in Slack in #core by afragen. View the logs.


4 years ago

#9 follow-up: @audrasjb
4 years ago

  • Keywords needs-refresh added; 2nd-opinion removed

Hi @afragen, thank you for putting this patch together,

I see a small i18n issue here:

/* translators: s: URL to WordPress Updates screen. */
$stay_updated = sprintf( __( 'Please <a href="%s">stay updated</a>.' ), network_admin_url( 'update-core.php' ) );
$msg          = $is_development_version ? $msg . '&nbsp;' . $stay_updated : $msg;

Indeed, RTL Locales may need to control the order of the displayed message. Using sprintf would allow them to switch the content of the $msg and $stay_updated strings 🌎😎

Last edited 4 years ago by audrasjb (previous) (diff)

This ticket was mentioned in PR #866 on WordPress/wordpress-develop by afragen.


4 years ago
#10

  • Keywords needs-refresh removed

When the user is on the current release, but is set to receive nightlies, via the Beta Tester plugin or otherwise, the footer message will be You are using a development version... technically this is incorrect.

Simplify the footer message to Version 5.7-alpha-xxx. Please stay updated. or Version 5.6.

Trac ticket: https://core.trac.wordpress.org/ticket/51976

#11 in reply to: ↑ 9 @afragen
4 years ago

Replying to audrasjb:

Hi @afragen, thank you for putting this patch together,

I see a small i18n issue here:

/* translators: s: URL to WordPress Updates screen. */
$stay_updated = sprintf( __( 'Please <a href="%s">stay updated</a>.' ), network_admin_url( 'update-core.php' ) );
$msg          = $is_development_version ? $msg . '&nbsp;' . $stay_updated : $msg;

Indeed, RTL Locales may need to control the order of the displayed message. Using sprintf would allow them to switch the content of the $msg and $stay_updated strings 🌎😎

Updated in https://github.com/WordPress/wordpress-develop/pull/866

#12 @audrasjb
4 years ago

The PR looks good to me. @SergeyBiryukov any thought on this localization issue?

This ticket was mentioned in Slack in #core-auto-updates by afragen. View the logs.


4 years ago

#14 @audrasjb
4 years ago

  • Keywords commit added

As per todays #core-auto-updates meeting, let's move this one for commit.

#15 follow-up: @SergeyBiryukov
4 years ago

Thanks for the patch!

Personally, I like the existing wording which seems to imply that running a development version is "cool" :) I think it adds a bit of personality, so I'm not quite a fan of removing it.

Re-reading comment:2 and looking at the previous changes in [49708] and [49736], I think the only change needed here is to make sure the message is really about the current $wp_version value and not about the API response.

See 51976.3.diff. This should address the concerns of displaying an inaccurate message and would also be consistent with the same message in core_upgrade_preamble() on WordPress Updates screen.

Last edited 4 years ago by SergeyBiryukov (previous) (diff)

#16 in reply to: ↑ 15 @audrasjb
4 years ago

Replying to SergeyBiryukov:

Personally, I like the existing wording that implies that running a development version is "cool" :) I think it adds a bit of personality, so I'm not quite a fan of removing it.

Re-reading comment:2 and looking at the previous changes in [49708] and [49736], I think the only change needed here is to make sure the message is really about the current $wp_version value and not about the API response.

This sounds… cool to me 😊

#17 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 50121:

Upgrade/Install: Display correct message about the current version in the admin footer.

Previously, "You are using a development version" message could be displayed if the user has configured core updates to receive Beta or RC versions, but the update has not happened yet.

This brings some consistency with displaying a similar message in core_upgrade_preamble() on WordPress Updates screen.

Follow-up to [49708], [49736].

Props afragen, pbiron, azaozz, audrasjb, SergeyBiryukov.
Fixes #51976.

Note: See TracTickets for help on using tickets.