Reputation: 3654
After running drush cr
to clear the cache, all of the CSS styles have disappeared when accessing pages under /admin/
. This includes pages in a custom module but also the default administration pages like /admin/appearance
When I examine the page source for any page the style sheet links are all empty:
<link rel="stylesheet" media="all" href="/" />
It seems like other people have had this issue, but no fix has been found.
What's going on? How can I fix my admin styles?
Upvotes: 1
Views: 836
Reputation: 3654
The short answer is that this is a permissions problem. Drupal prompts you to change the permissions for the sites/default/files
directory to allow the system to cache files.
If you use chown www-data sites/default/files
the message will disappear but Drupal still won't be able to write to the cache correctly because the files in that folder aren't owned by the web server.
You need to grant write permissions to all the contents of that folder too. The easiest way is chown -R www-data sites/default/files
but Drupal has an extensive guide to file permissions you may want to read.
Upvotes: 3