Roots Discourse

Old Roots theme breaks wp-admin in WordPress 5.3

We use roots theme in Wordpress and it now has a broken admin in Wordpress 5.3.

Any urgent fix available?

I don’t know if this is the correct solution to the reported error (net::ERR_HTTP2_PROTOCOL_ERROR) but as a temporary fix I added the following line to config/environments/production.php in the sage theme folder…

define( ‘CONCATENATE_SCRIPTS’, false );

why do you say this error? Are you on the right topic?

That’s the error that Chrome reported when I ran into the same issue. Have you checked to see what error is being reported in your case?

thanks. I have to try again. I revert back from backup to previous WP version in the meantime.

I’ve had this happen on three older Sage/Roots sites so far.

In all cases, upgrading WP to 5.3 broke the WP Editor by making it impossible for WP to load all of the relevant CSS.

The fix is to go into:

/lib/cleanup.php

and comment out the line that hooks the cleanup function roots_clean_style_tag into the style_loader_tag filter like so:

//add_filter('style_loader_tag', 'roots_clean_style_tag');

Before:

After:

I hope that helps someone!

8 Likes

Thanks for that fix, helped in on a couple of old sites today. Much appreciated

1 Like

In the newer but still old Soil theme you have to go to /lib/config.php and comment out
add_theme_support('soil-clean-up');

This is actually a pretty big issues, cause what happens is none of the plugin’s admin css files are loaded.

As of Soil 3.7.2, nothing should be running from Soil in the wp-admin

Hi,
So how one can update the WP theme based on roots? Should it not provide an update to fix old themes?

I do not have that line

[sewmyheadon] gave the right solution

Hi,
How to upgrade roots theme then? I don’t know what soil is. I have roots 6.5.1

You don’t need to upgrade your Roots theme (it’s a starter theme, doing so would wipe your theme and you’d need to restart from scratch). Older versions of the Roots theme just need the applicable code removed per the solution selected on this topic.

Users running Soil, which contains some features used in the older versions of Roots, will need to upgrade to the latest version. That can be done via GitHub or from https://roots.io/product-links/

I’m having the exact same issue (before pic looks like by back-end), but I can’t even get to my CSS to load to implement the fix. When I open my Theme Editor it shows the CSS for a split second and then it completely disappears.

Disclaimer: I don’t have a web dev background and just admin the site, so maybe I’m missing something simple here.

Hey @katierc - can you connect to the site via FTP or use the hosting File Manager to access these files instead? That’s the way to go, I think.

Thank you! I had shared your original solution post with a colleague who has more web dev knowledge, and he was able to fix it. I’ll ask him to show me how he accessed it so I’ll know for other fixes in the future. Thanks SO much for sharing the original post. It took me a while to diagnose the cause of all the different issues we had after the 5.3 update, so this was incredibly helpful.

My pleasure, @katierc. I’m glad you got it sorted.

It took me a bit to figure out what was happening and I was pretty sure it would happen to others too so I’m really glad it helped.

This topic was automatically closed after 42 days. New replies are no longer allowed.