Sage + WordPress 5.9 Update - Blank page for editor

Hello,

I have made the WordPress Update (5.8.1 → 5.9) of a bedrock/sage website. After that, the front-end was OK, but now the back-end. I explain why : when I try to edit a page, I got a white page.

I have tried to find the debug.log or error.log to get some clues but I haven’t find these files.

  1. Does someone know how to check if error are active?

  2. And where are this files? debug.log / error.log

  3. Do you know a way to know the version of my sage installation? I guess it’s the 9.0 but I am not sure.

Thanks by advance!

Hey

I have the same issue.
Can you check your browser console for errors please ?
Do you have anything there ?

Thanks !

Hey,

Do you use bedrock too ?

No we are running a “regular” install.
The error popping up is :

l.styles.forEach is not a function

from script react-dom.min.js

This happened after a core update to 5.9, have been narrowed down to the theme by removing all plugins, then switching to twentytwentytwo.

Checked also with another project running the same setup and the error showed after the core update too

Looks like a Gutenberg-related issue (Gutenberg editor is based on React).
Have you installed and enabled the additional Gutenberg plugin? Is it of the last version?

Yes, I am running Sage with Bedrock.

I tried and installed the Gutenberg plugin, checked it was up to date. The issue is still there.

The folks in this thread running into the issue need to provide more details.

What version of Sage are you running? Have you made modifications? Does it work without modifications on a fresh installation?

Hi Ben. I am experiencing this issue too.

I’m using Sage 9 with PHP 7.4. It’s a theme developed from me for some years.

And today, when I upgraded WP to 5.9.1 the theme shows a blank page. If I open the Appearence > Themes page, the thumbnail of the theme is blank too.

If I activate another theme from WP it’s OK.

Can you try disabling FSE?

add_action('after_setup_theme', function () {
    /**
     * Disable full-site editing support.
     */
    remove_theme_support('block-templates');
});

Hi guys

Sorry for the late reply, just had a few hectic weeks.

  • Yes our version of Sage is slightly modified
  • No, the problem does not happen with a fresh Sage install
  • remove_theme_support doesn’t fix the issue.

Now, much more relevant, I have the same kind of issue (different error in the console but same result) on an old “from scratch” theme, which seems to indicate my problem is not coming from Sage. Moreover, we’re finalizing a new website with the same tech stack than the initial failing ones (Sage themes) and it supports the 5.9.1 version of Wordpress without issues.

So we’ll try to find an explanation somewhere else.
I’ll answer that thread if I find anything !

Thanks

1 Like

Got it.

After sorting through a few posts about the exact same issue, it looks like this is happening because the core is trying to load the block editor stylesheet and can’t find it.
In our case it was because amongst the theme modification we made, we added that filter :

add_filter('block_editor_settings', function ($editor_settings) {
    unset($editor_settings['styles'][0]);
    return $editor_settings;
});

to reset the default editor style.

When our filter is removed, the admin pages are back up.

Hope that helps

2 Likes

Thanks a lot for following up with the solution :pray:

Thank you for your message.

Unfortunately, this does not solve the problem on my side.

Do you have anything in your console as for error messages ?
Did you have that filter in your code ?