WordPress.org

Make WordPress Core

Opened 9 days ago

Last modified 25 minutes ago

#51822 accepted defect (bug)

Ensure update-core.php knows you're using a development version

Reported by: afragen Owned by: audrasjb
Milestone: 5.6 Priority: normal
Severity: normal Version: 5.6
Component: Upgrade/Install Keywords: has-patch has-screenshots dev-feedback
Focuses: Cc:

Description

In r49638 the update-core page was updated and simplified. One of the regressions seems to be that if you are using the Beta Tester plugin and on the Beta/RC Only stream the message will be displayed as

You have the latest version of WordPress.

As you are on a beta/RC it should still say You are using a development version of WordPress.

The attached patch fixes this issue.

Pinging @helen

Attachments (5)

51822.diff (1.1 KB) - added by afragen 9 days ago.
Capture d’écran 2020-11-18 à 19.50.12.png (178.7 KB) - added by audrasjb 9 days ago.
Before patch
Capture d’écran 2020-11-18 à 19.50.29.png (182.3 KB) - added by audrasjb 9 days ago.
After patch
51822.2.diff (1013 bytes) - added by afragen 9 days ago.
remove outdated conditional
51822.3.diff (1.1 KB) - added by afragen 7 days ago.
updated per @azaozz recommendations

Download all attachments as: .zip

Change History (15)

@afragen
9 days ago

#1 @afragen
9 days ago

  • Keywords has-screenshots added

#2 @audrasjb
9 days ago

  • Keywords changed from has-patch dev-feedback has-screenshots to has-patch has-screenshots dev-feedback
  • Owner set to audrasjb
  • Status changed from new to accepted

Good point @afragen, this is a regression from the previous changes made in Beta 4.
The proposed patch looks good and fixes the issue (see screenshot above).

@afragen
9 days ago

remove outdated conditional

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


9 days ago

#4 @SergeyBiryukov
9 days ago

Thanks for the ticket and the patch!

Just noting that in my testing the results were initially a bit different from the screenshots here.

Without the Beta Tester plugin:

  • On 5.6-RC1: "An updated version of WordPress is available."
  • On 5.6-RC1-49652: "You are using a development version of WordPress."
  • On 5.7-alpha-49651: "You are using a development version of WordPress."

This all actually seems accurate and follows one of the goals of [49638]:

Ensures only one heading between update available, you are on a dev version, and you are on latest appears at any given time, falling back to you are on latest if something strange happens with the returned update data.

So it looks like the regression here is that when there is an update available, you no longer get the "You are using a development version of WordPress" message, but that was the intention of [49638].

However, with the Beta Tester plugin (set to the Beta/RC Only stream as noted) the messages are indeed different and don't mention the development version, because in this case $updates[0]->response appears to be latest rather than development:

  • On 5.6-RC1: "You have the latest version of WordPress."
  • On 5.6-RC1-49652: "You have the latest version of WordPress."
  • On 5.7-alpha-49651: "You have the latest version of WordPress."

This seems like a larger regression.

Without the plugin, 51822.2.diff doesn't seem to make any difference, the messages are still the same, because "An updated version of WordPress is available" message has the higher priority.

With the plugin, 51822.2.diff does fix the issue and displays "You are using a development version" in all three cases.

#5 @afragen
8 days ago

@SergeyBiryukov I absolutely agree with your findings above. I would also like to point out that having the Beta Tester plugin active or using the WP_AUTO_UPDATE_CORE constant set to beta or rc should give similar results.

#6 follow-up: @afragen
7 days ago

The regression is when Beta Tester or the constant is set. If there's an update available it should behave as it does and only report that.

#7 in reply to: ↑ 6 ; follow-up: @azaozz
7 days ago

Replying to afragen:

The regression is when Beta Tester or the constant is set.

Hmmm, should that (also) be fixed in the Beta Tester plugin? Seems Beta Tester is not fully compatible with having WP_AUTO_UPDATE_CORE when set to one of the new values, beta or rc. (As far as I understand these duplicate the same functionality).

Last edited 7 days ago by azaozz (previous) (diff)

#8 @azaozz
7 days ago

Looking at 51822.2.diff, It makes sense to check $wp_version to "see" if it is production or dev. Perhaps the regex would be faster/better as

$development = preg_match( '/alpha|beta|RC/', $wp_version );
Last edited 7 days ago by azaozz (previous) (diff)

#9 in reply to: ↑ 7 @afragen
7 days ago

Replying to azaozz:

Replying to afragen:

The regression is when Beta Tester or the constant is set.

Hmmm, should that (also) be fixed in the Beta Tester plugin? Seems Beta Tester is not fully compatible with having WP_AUTO_UPDATE_CORE when set to one of the new values, beta or rc. (As far as I understand these duplicate the same functionality).

The Beta Tester plugin accounts for a user setting the WP_AUTO_UPDATE_CORE constant to beta or rc. 😉

@afragen
7 days ago

updated per @azaozz recommendations

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


25 minutes ago

Note: See TracTickets for help on using tickets.