• I created a simple plugin that pulls session data into a shortcode for use with gravity forms hidden fields.
    when it is activated i get the following error if I edit anything inside the theme editor (IE Functions.php)

    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

    I am not sure what from my code is blocking it. how can i debug this issue and fix it?

    THANKS!

    • This topic was modified 6 years, 7 months ago by rayge.
Viewing 4 replies - 1 through 4 (of 4 total)
  • 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);
    }
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Plugin Conflict’ is closed to new replies.