Joy
(@joyously)
It sounds as if your plugin is affecting things it shouldn’t. Your plugin should only be invoked on the front end or in the post editor? Is it grabbing data and not returning, even when in the theme editor?
Thread Starter
rayge
(@rayge)
It should only invoke on the front end. and its working fine EXCEPT when i try and save changes in the theme-editor
I tried adding this to wp-config.php
// Enable WP_DEBUG mode
define( ‘WP_DEBUG’, true );
// Enable Debug logging to the /wp-content/debug.log file
define( ‘WP_DEBUG_LOG’, true );
// Disable display of errors and warnings
define( ‘WP_DEBUG_DISPLAY’, false );
@ini_set( ‘display_errors’, 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( ‘SCRIPT_DEBUG’, true );
but it generated no log file. so that didnt help me any
RAY
Thread Starter
rayge
(@rayge)
OK so i surrounded my plugin code with
if(!is_admin()) {
}
This solved the problem but it would be nice to know what caused the issue in the first place.
probably ini_set is disabled for security you can modify wp-includes / load.php at your own risk as follows … you only get the error page.
Before https://github.com/WordPress/WordPress/blob/master/wp-includes/load.php#L309
if(!isset($PHP_SELF)) {
$PHP_SELF = '';
}
After
global $PHP_SELF;
After https://github.com/WordPress/WordPress/blob/master/wp-includes/load.php#L345
if(!(strtolower((string) @ini_get('log_errors')) == 'on' || (string) @ini_get('log_errors') == '1' )) {
if (!function_exists('wp_fix_server_vars')) {
require_once ABSPATH . WPINC .'/load.php';
}
wp_fix_server_vars();
error_log("you have a error here $PHP_SELF\n",3,$log_path);
}