WP-Config - invalid values for WP_DEBUG defines

Q: Date/Time this occurred (Provide your time zone also)
**A: 19 Jan 2021 11am

Q: DevKinsta Version
**A: 1.0.1

Q: OS Version
**A: Mac OS X 10.15.7 (Catalina)

Q: Docker Desktop Version
**A: 3.1.0

Q: Were any error codes or messages observed? If so, what were they?
**A: None

Q: Detailed Description of the Problem
**A: Value of WP_DEBUG_DISPLAY ignored.
The values entered by default are strings (i.e. quoted) not Boolean -
these are the correct values:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );

Good catch! Thanks for reporting.

Q: Date/Time this occurred (Provide your time zone also)
A: Feb 9 2021 - 7:36PM MST

Q: DevKinsta Version
A: Latest

Q: OS Version
A: Windows 10

Q: Docker Desktop Version
A:

Q: Were any error codes or messages observed? If so, what were they?
A: Debugging is showing even though WP_DEBUG is off.

Q: Detailed Description of the Problem
A: On one of my pages debugging messages are still appearing despite WP_DEBUG being false.


image

Hi @aidenberzins . Would you happen to have WP_DEBUG inserted anywhere else? Perhaps in your themes function.php file?

No, it is not defined elsewhere. I did an entire file search.

It appears when you toggle the switch the
wp-config.php is either all true or all false.

But when the settings are as follows the errors no longer display on the front end.

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
1 Like

So when you toggle between it appears to change the value to strings rather than booleans. So this does seem to be a bug.

1 Like

Thanks for reporting this! It does appear to be a bug. I’ll let you know when this is solved :slight_smile:

I had same issue as @aidenberzins . I turned the debug switch off, however, debug messages were still showing. To fix: in wp-includes/load.php on line 450: change ini_set( ‘display_errors’, 1 ); TO ini_set( ‘display_errors’, 0 ); in order to remove the debug messages. Screenshot 2021-03-22 001744

NOTE - The issue has to do with invalid values in the define for WP_DEBUG - the quoted string 'true" or ‘false’ evaluates as true - you need to remove the quotes for the values to be corrected evlauated.

For those experiencing this issue, be sure to replace your wp-config.php values with the following:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Hey Michael,

I know it may not be helpful but simply removing the tags altogether works fine. Why not instead of changing them to false DevKinsta simply removes all 3? I simply remove all 3 and the problem is solved as well.

P.S. I came here to ensure this bug was posted.

Best regards,
Andrew

I’m experiencing the same issue.

WP_DEBUG turns on in the GUI, messages shows, all OK. Turning it off in the GUI does not work.

Workaround – Turning the WP_DEBUG off with WP CLI works:

wp config set WP_DEBUG false --raw

Certainly can and removing it altogether works just as well. :+1::sunglasses: It’s optional

Q: Date/Time this occurred (Provide your time zone also)
A:

Q: DevKinsta Version
A: 2.2.0

Q: OS Version
A: macOS Big Sur

Q: Docker Desktop Version
A: 4.1.1

Q: Were any error codes or messages observed? If so, what were they?
A: No

Q: Detailed Description of the Problem
A:

When activating WP_DEBUG from DevKinsta UI, it is turned on, but when deactivating the settings returned to wp_config.php file is added with strings instead of f boolean, so the setting is not interpreted.

It works again if you change the settings from:
define( ‘WP_DEBUG’, ‘false’ );
define( ‘WP_DEBUG_LOG’, ‘false’ );
define( ‘WP_DEBUG_DISPLAY’, ‘false’ );
to this:
define( ‘WP_DEBUG’, false );
define( ‘WP_DEBUG_LOG’, false );
define( ‘WP_DEBUG_DISPLAY’, false );

This issue (and fix!) was first reported on the 19th of January here: WP-Config - invalid values for WP_DEBUG defines - #12 by Andrew_Fair

Why is this change not implemented yet??

Regards,
Andreas
Aptum

Welcome to DevKinsta @andreasaptum ! I’ve merged your post with this one here to consolidate the same report. I’m sorry for the issue here. We’re aware of the issue and will provide an update here as soon as this is resolved.

Hi everyone! The latest version of DevKinsta 2.3.0 has resolved this bug. Thank you everyone for reporting this! Here’s more information on this update: DevKinsta Releases (Minor) - #7 by michael