#46877 closed defect (bug) (fixed)
Site Health warns about `WP_DEBUG_DISPLAY` when `WP_DEBUG` is the cause.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.2 | Priority: | normal |
| Severity: | normal | Version: | 5.2 |
| Component: | Site Health | Keywords: | site-health has-patch |
| Focuses: | administration | Cc: |
Description
I was testing site health and noticed the messaging for the WP_DEBUG check doesn't match what is in my test site.
The warning says "The value, WP_DEBUG_DISPLAY, has either been added to your configuration file, or left with its default value.“, which doesn’t make it clear that it’s WP_DEBUG that did it.
https://github.com/WordPress/wordpress-develop/blob/master/src/wp-includes/default-constants.php#L82
https://github.com/WordPress/wordpress-develop/blob/master/src/wp-includes/load.php#L276
I think it'd be great to adjust the wording of the message so that it's clear to users that WP_DEBUG in wp-config.php causes/can cause this behavior, so that they aren't confused by WP_DEBUG_DISPLAY not being in their wp-config.php.
I'll have a go at wording, but if someone else gets to it first, then great!
Attachments (3)
Change History (15)
#2
follow-up:
↓ 3
@
7 years ago
- Keywords has-patch added; needs-patch removed
@mikeschroder Can you please add /* translators: %s: Name of the constant used. */ for both constant
#3
in reply to:
↑ 2
@
7 years ago
Replying to mukesh27:
@mikeschroder Can you please add
/* translators: %s: Name of the constant used. */for both constant
Thank you!
The patch adds a second identical line to account for the new %s that I added. Did I do so incorrectly? If so, where should the second one go -- or should it have a different context?
#4
@
7 years ago
@mikeschroder my mistake no need to change translators as both constant are default.
@
7 years ago
Hopefully corrected addition of second string and context notes with suggestion for second from @clorith.
#5
@
7 years ago
- Milestone changed from Awaiting Review to 5.2
I've got a lot to learn with internationalization.
Hopefully 46877.2.diff is in the right direction.
Used suggestion from @clorith for second string's context.
Adding to milestone for consideration after chatting with them about it.
#6
@
7 years ago
You can actually name the constant in the comment: 1: WP_DEBUG_DISPLAY, 2: WP_DEBUG. The same should be done for the message about WP_DEBUG_LOG: %s: WP_DEBUG_LOG.
#7
@
7 years ago
In 46877.3.diff, made the changes @ocean90 recommended.
Uploaded an initial idea for this in 46877.diff. I'll note, talking about constants as "the value" sounds a bit odd to me, and I think something that says that [constant name] is enabled/added/set to true in
wp-config.phpwould be clearer, but I'm guessing I'm missing some background here.In that light, an alternate suggestion as well: