Greetings!
I have a problem where Olivero theme (or any other theme) is working in Maintenance mode, but once I switch maintenance mode off, I have a white page with a long list of menu item w/o any styling (see screenshot).
Initially, I installed drupal:10-fpm-alpine using Docker, which is now updated to drupal 10.2.4. It has nginx 1.22.1, PHP 8.2.12 and MySQL 8.0.35.
I found one suggested solution on a Drupal forum (theming - Upgrade to Drupal 10.1.6, Theme Doesn't Load Outside Maintenance Mode - Drupal Answers), which said:
======================================
Drupal 10.1.x introduced CSS and JavaScript aggregation performance improvements in that there is change to .htaccess file as well.
Sites using nginx/php-fpm may need to update their nginx.conf file to pass through the css/js path to Drupal.
Before
# Passes style generation to PHP.
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
After
# Passes image style and asset generation to PHP.
location ~ ^/sites/.*/files/(css|js|styles)/ {
try_files $uri @rewrite;
}
======================================
The thing is that being a newbie, I’m not sure how to apply that suggestion, because I only have these two nginx.conf files:
/var/lib/docker/overlay2/464cd198c9f1ece0e669690a0a61d353e1d3f8b457489ab24eee2f12c637aff3/merged/etc/nginx/nginx.conf /var/lib/docker/overlay2/ae457ff4ced0f9e2e384a51fc1fc502f299652899cf0bd5321b7777f2e7568c5/diff/etc/nginx/nginx.conf
that don’t have the
# Passes style generation to PHP.
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
or anything PHP related. I suppose I should be editing some other file, but which? Any advice will be most welcome!