Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter wpguillaume

    (@wpguillaume)

    I just read about the SCRIPT_DEBUG define on this page:
    https://codex.www.ads-software.com/Debugging_in_WordPress
    It seems that loading

    the “dev” versions of some core CSS and JavaScript files rather than the minified versions that are normally loaded

    fixes the dashboard. Now I need to understand how to disable SCRIPT_DEBUG and enable CONCATENATE_SCRIPTS without breaking the dashboard.

    Thread Starter wpguillaume

    (@wpguillaume)

    Not as good as I thought. The dashboard page & post editor is still broken. See this picture.
    The article content appears “blank”. I see it when I select it (but it was left out from my Ubuntu default screenshot tool).

    Any pointers appreciated! ??

    Thread Starter wpguillaume

    (@wpguillaume)

    Following up… ??

    I enabled logging debug information in 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 );

    I got no output while browsing the dashboard’s editor. I checked that logging worked by adding these lines to my child theme’s functions.php (from this thread)

    if (!function_exists('write_log')) {
    
        function write_log($log) {
            if (true === WP_DEBUG) {
                if (is_array($log) || is_object($log)) {
                    error_log(print_r($log, true));
                } else {
                    error_log($log);
                }
            }
        }
    
    }
    
    write_log('THIS IS THE START OF MY CUSTOM DEBUG');

    Output was indeed written to debug.log. But now I don’t know where to look next…

    Thread Starter wpguillaume

    (@wpguillaume)

    I diffed a local backup from before migrating with the live version and noticed some differences in minified css and js files in wp-admin/ and wp-includes/.
    Replacing these entire folders with fresh 4.9.7 versions fixed everything.
    End of story. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘4.9.7 Dashboard not loading properly after migrating from subfolder to root’ is closed to new replies.