Custom CSS/HTML not working after restore on new site

(Christoph) #1

I moved my forum to a new server by downloading the backup from the old server and restoring it on the new one.

When I logged in after the restore, I noticed that the navigation bar that was sitting on to of the discourse header (similar to what we see on is not showing so I checked my custom HTML/CSS and found that all the code was there and that “enabled” was also ticked, but the navbar was nowhere to be seen.

So I tried disabling, saving, enabling, saving and indeed: the navigation bar came back.

Next, I found that the links that I had added to the hamburger menu were also gone. The same trick worked here: disable, save, enable, save. However, once the additional links showed up in the hamburger menu, the navigation bar disappears again. Even after a rebuild, I cannot seem to have both.

Another thing that might be related but went away after a rebuilt was that most (all?) of the settings (such as a custom contact URL or the authentication info for facebook or google) were not shown under site_settings. Nevertheless, they seemed to be active anyway (for example, the contact url was correctly shown on the about page. I’m not sure if is expected behaviour that these will only show after a rebuild but I thought I’d mention it.

(Régis Hanol) #2

Did you rebuild your container after the restore? It usually is necessary in order to properly clean things up.

(Christoph) #3

Yes, I did a rebuild and, as mentioned, the missing settings re-appeared but the CSS issue remains. The exact same setting continue to work on the original site.

(Christoph) #4

The problem had been solved by reconfiguring the (outer) NGINX and fixing the SSL certificate. I am not sure exactly which change fixed the issue nor how the NGINX configuration led to the described behaviour, but I thought I’d mention it here if anyone sees a similar issue. In that case: check you webserver configuration!

Unfortunately, I was wrong with this observation. I am still seeing issues with CSS. Apparently, the issue is simply less predictable. Sometimes it works, sometimes it doesn’t. Don’t see any pattern at the moment. For example, when I just added the CSS for Material Design Buttons, the top navigation bar disappeared again…