Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293938

^10.1 CSS aggregation breaks during maintenance mode

$
0
0

Problem/Motivation

CSS aggregation isn't automatically disabled in ^10.1 in maintenance mode and doesn't aggregate CSS for users without the 'access site in maintenance mode' permission, resulting in unstyled pages.

Steps to reproduce

  1. Install Drupal core ^10.1
  2. Make sure no aggregated CSS for the maintenance page is saved to disk. Delete the aggregated asset directory if necessary.
  3. Enable CSS aggregation and turn on maintenance mode.
  4. Visit the site with a user that does not have the 'access site in maintenance mode' permission. You should end up with an unstyled page.
  5. Check the browser console; in both Firefox and Chrome, you should see some variation of an error that the aggregated CSS was not loaded due to corrupt or incorrect content type, as it's actually serving the maintenance page HTML rather than CSS.

Proposed resolution

At Neurocracy/Omnipedia we settled on adding '_maintenance_access': true option to the 'system.css_asset' route as a workaround to allow us to use aggregated CSS, but a better solution may be to disable CSS aggregation automatically like JS aggregation seems to be in maintenance mode.

Remaining tasks

TBD.

User interface changes

CSS actually loads.

API changes

None?

Data model changes

None?

Release notes snippet

TBD.


Viewing all articles
Browse latest Browse all 293938

Trending Articles