"Saruman believes it is only great power that can hold evil in check, but that is not what I have found. I found it is the small everyday deeds of ordinary folk that keep the darkness at bay. Small acts of kindness and love." --Gandalf

Missing styles-l.css and styles-m.css

Friday, October 15th, 2021

If your Magento 2.4.x site has suddenly stopped displaying any styles and there's no styles-l.css or styles-m.css in the source? Is it working on someone else's local but not your's? Have you recompiled Magento over and over again hoping for it to magically start working but no luck?

The problem is with PHP 7.4.20.

Specifically, the problem is with a single setting in php.ini.

Go to your php.ini and add the following line:


Restart php-fpm, apache, nginx, or whatever you are using and redeploy your site.

Don't thank me. Thank @Pascal LE MINH on Magento StackExchange https://magento.stackexchange.com/questions/340107/missing-css-from-source-code-magento-2-4-2.

Views: 87