CSS overrides aren't working after restoring from backup

Hi folks,

Just moved a Discourse instance to a new server using the builtin backup functionality. Everything went smoothly, except some of the old CSS overrides don’t seem to be working anymore, and there’s a lot of this in the logs:

Error: Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 4.0.0) or downgrade your runtime to an older version (>= 2.0.0-beta.1).
at Object.r [as checkRevision] (http://selectbutton.net/assets/vendor-b446ddf94c0fbadd8f0c95717a0ead0e.js:1:10979)
at Object.i [as template] (http://selectbutton.net/assets/vendor-b446ddf94c0fbadd8f0c95717a0ead0e.js:1:12411)
at r.e.template (http://selectbutton.net/assets/vendor-b446ddf94c0fbadd8f0c95717a0ead0e.js:1:2821)

Tried rebuilding a couple times and toggling the overrides on and off but that doesn’t seem to be working. Any advice?

1 Like

PS – I suppose it’s possible that this coincided with an update that broke some of our more complicated CSS.

figured it out – all of the non-header overrides were working, but the stuff in the headers was not, and making a change to the headers and saving it caused it to recompile.

so, reassuringly, this is not an upstream change that broke our CSS overrides, but it does seem to be a legitimate bug if you’re restoring a backup that includes CSS headers, because those don’t get automatically recompiled.


Interesting, any ideas here @eviltrout? Appears to be handlebars version related.


Thanks for reminding me about that feature! We upgraded Handlebars to deal with security issues and I forgot that we precompiled some stuff in the database too. It’s fixed in this commit: