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.:
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.