skip to Main Content

I’ve been fiddling quite a lot with an issue with the new Gutenberg editor in wordpress 5.x in which i experienced a white/blank screen when trying to edit a page.

What’s weird is that I originally thought it was due to Yoast SEO (plugin) and an error with ‘pluginSidebar’, but disabling it didn’t make a difference.

I also tried all the possible solutions I found, e.g.:

  • Delete browser cache
  • Delete server cache (W3TC)
  • Disable all plugins
  • Change theme (which actually solved it, but isn’t a theme-issue (see answer)

2

Answers


  1. Chosen as BEST ANSWER

    I've chosen to create a question and answer it myself as I've been bothered with this issue quite some time, and I'm hoping it might help some others.

    After several attempts of fixing it and multiple searches I've finally found the error through trial-and-error, and the issue stems from an old "tip" (e.g. from here) for speed optimization in which you disabling the queuing of wp-embed.min.js (hook: wp-embed) such as below:

    function my_deregister_scripts(){
     wp_dequeue_script( 'wp-embed' );
    }
    add_action( 'wp_footer', 'my_deregister_scripts' );
    

    However, disabling/dequeuing the wp-embed causes Gutenberg to malfunction and return a white screen!

    Solution: If you have the above line of code in your functions.php then try to remove it, if you experience a white screen.


  2. I solved similar problem by deleting these lines. If you have similar expressions which change behavior of script’s, it may cause problem. For my case, I deleted a function from function.php file:

    function js_async_attr($tag)
    {
        # Add async to all remaining scripts
        return str_replace(' src', ' async="async" src', $tag);
    }
    add_filter('script_loader_tag', 'js_async_attr', 10);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search