Make WordPress Core

Opened 4 years ago

Closed 2 years ago

Last modified 2 years ago

#51041 closed defect (bug) (fixed)

Incorrect message about the status of WP_AUTO_UPDATE_CORE

Reported by: johnbillion's profile johnbillion Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: normal
Severity: normal Version: 5.5
Component: Site Health Keywords: has-patch good-first-bug
Focuses: Cc:

Description

When the following code is in place in wp-config.php, the phrasing used on the Site Health screen is confusing.

define('WP_AUTO_UPDATE_CORE', false);

The Site Health message says The WP_AUTO_UPDATE_CORE constant is defined and enabled when in fact the constant is defined and disabled.

Attachments (4)

51041.diff (586 bytes) - added by chrisbudd1 4 years ago.
Capture d’écran 2022-09-22 à 09.39.21.png (162.0 KB) - added by audrasjb 2 years ago.
Capture d’écran 2022-09-27 à 11.22.13.png (198.2 KB) - added by audrasjb 2 years ago.
using define('WP_AUTO_UPDATE_CORE', false);
Capture d’écran 2022-09-27 à 11.22.34.png (160.4 KB) - added by audrasjb 2 years ago.
using define('WP_AUTO_UPDATE_CORE', 'minor');

Download all attachments as: .zip

Change History (22)

#1 @johnbillion
4 years ago

This message might actually be redundant due to the subsequent message in the same section that says:

WordPress security and maintenance releases are blocked by define( 'WP_AUTO_UPDATE_CORE', false );.

#2 @mukesh27
4 years ago

Hi there!

It should be disabled instead of enabled

@chrisbudd1
4 years ago

#3 @chrisbudd1
4 years ago

Created a patch to change the wording to the suggested "disabled", although it feels like "in use" might be better when paired with the later messaging:

WordPress security and maintenance releases are blocked by define( 'WP_AUTO_UPDATE_CORE', false );.

Also, neither "disabled" or "enabled" are completely accurate anyway as that message will show if you define the constant as anything unexpected (so anything that isn't true or "minor").

#4 @mukesh27
4 years ago

  • Keywords has-patch added; needs-patch removed

@chrisbudd1 Thanks for the patch and suggestions.

#5 @Clorith
2 years ago

  • Keywords needs-refresh good-first-bug added
  • Milestone changed from Awaiting Review to 6.1

This line should probably provide the value of the constant instead, perhaps something like this:

The %1$s constant is defined as $2$s

This would allow it the flexibility needed to account for the various values it could have that indicate it is impacting something, but not be opinionated about what it is defined as.

(the translators comment would need to be updated accordingly in a refreshed patch).

#6 @robinwpdeveloper
2 years ago

Agreed with @Clorith
Providing the value of the constant will be more useful.

#7 @Clorith
2 years ago

  • Milestone changed from 6.1 to Future Release

As the beta for WordPress 6.1 is planned for tomorrow, and the patch still needs some work, I'm moving the ticket out of the milestone. This doesn't mean it can't be worked on though, and once the patch is up to date and ready we can reevaluate its inclusion at that time :)

This ticket was mentioned in PR #3277 on WordPress/wordpress-develop by robinwpdeveloper.


2 years ago
#8

  • Keywords needs-refresh removed

Fixes site health notice regarding WP_AUTO_UPDATE_CORE constant updated
Trac ticket: 51041

#9 @robinwpdeveloper
2 years ago

@Clorith Can you please re check and consider this one for 6.1 if everything works fine :)

robinwpdeveloper commented on PR #3277:


2 years ago
#10

Hi @Clorith thanks for the review.
Requested changes are made and pushed.

Please let me know if there is any more issue.

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


2 years ago

#12 @desrosj
2 years ago

  • Milestone changed from Future Release to 6.1

#13 @audrasjb
2 years ago

  • Keywords changes-requested added

I tested the proposed patch with define('WP_AUTO_UPDATE_CORE', false); and the second parameter returns an empty string, so it doesn't works for me. See screenshot below.

robinwpdeveloper commented on PR #3277:


2 years ago
#14

PR updated to display constant value properly.

@audrasjb
2 years ago

using define('WP_AUTO_UPDATE_CORE', false);

@audrasjb
2 years ago

using define('WP_AUTO_UPDATE_CORE', 'minor');

#15 @audrasjb
2 years ago

  • Keywords changes-requested removed
  • Owner set to audrasjb
  • Status changed from new to accepted

Alright, it looks good to me now.

#16 @audrasjb
2 years ago

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

In 54325:

Site Health: Fix incorrect message about the status of WP_AUTO_UPDATE_CORE.

Previously, the Site Health message said "The WP_AUTO_UPDATE_CORE constant is defined and enabled" when in fact the constant was defined and disabled using define( 'WP_AUTO_UPDATE_CORE', false );.

This changeset improves the message by providing the value of the constant. For example: "The WP_AUTO_UPDATE_CORE constant is defined as false".

Props johnbillion, chrisbudd1, robinwpdeveloper, audrasjb, Clorith.
Fixes #51041.

#18 @peterwilsoncc
2 years ago

mukesh27 added to props via make/core per comments #2 #4.

Note: See TracTickets for help on using tickets.