Symptom: After deploying configuration changes to production, including a change to the theme (e.g. editing colours, colour scheme or logo on /admin/appearance/settings/bartik), you get a mostly white page because the colours are all missing. Yet when you visit that admin URL everything looks correct, and as soon as you click ‘Save Configuration’ the site is normal again.
What’s going on?
This happens if you’re using a standard Drupal .gitignore file, which typically has the following:
# Ignore paths that contain user-generated content.
If you export your configuration and look at color.theme.bartik.yml – you’ll find this at the bottom:
Every time the colours are updated a new stylesheet is created in /sites/default/files/color/bartik-[hash], but .gitignore is ignoring these files, so even if you perform a configuration sync correctly, production won’t have the CSS file it needs.
It’s possible to hide a block from the entire site by accident, because of some counter-intuitive behaviour in the block Visibility settings.
By default, when placing a block there are settings for Content Types, Pages and Roles. Usually if you leave these blank (i.e. don’t select any checkboxes), the relevant tab has a summary label saying ‘No restrictions’ and they are ignored.
The Pages tab behaves a bit differently. It has Show and Hide radio buttons and a textarea to input URLs. If you leave the button set to show (the default) and the textarea is blank, the block is visible on all pages (barring any other restrictions such as the content type).
The danger is if you change it to Hide, and specify one or more pages to exclude. If in future you decide to remove those so the list is empty again, you must set the radio button back to ‘Show’, otherwise it’ll be hidden from all pages, even though the tab will still say ‘No restrictions’.
Specifically the combination in this screenshot hides the block everywhere, as if it were disabled completed:
So if you can’t figure out why a block isn’t showing, manually click the Pages tab and check the full settings. (This can be particularly confusing if you’re testing View blocks with complex contextual filters and they’re working in the Views UI preview, but not on the page.)