Debugging on stage server turned on, causes xml-rpc message errors #38

Closed
rdworth opened this Issue Jun 24, 2012 · 2 comments

2 participants

@rdworth

Certainly it is valuable to have debugging turned on for both php and wordpress notices on the stage. server, lines 16-17

// WordPress debugging mode (enables PHP E_NOTICE and WordPress notices)
define( 'WP_DEBUG', (bool) JQUERY_STAGING );

however, this prevents sites from deploying to the server because these notices are output as part of XML-RPC messages which causes

>> Error: Invalid XML-RPC message

Is there some way we can have debugging on generally but not for the xml-rpc page(s) specifically?

@nacin nacin was assigned Jun 24, 2012
@nacin
jQuery Foundation member

WP_DEBUG was a suggestion only; it was left in wp-config-sample.php rather than config.php so it could be removed at any time. I did not expect it would last.

For stage, legacy, and production, we should implement proper PHP error logging. We should probably only display these errors on dev, and maybe staging.

To prevent this from being an issue for XML-RPC requests, we can do something like this in config.php:

if ( defined( 'XMLRPC_REQUEST' ) )
    define( 'WP_DEBUG_DISPLAY', false );
@nacin nacin closed this in f98366a Jun 24, 2012
@rdworth

aefe09d was meant to reference jquery/jquery.org#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment