1

I'm using Magento 2.3.3, after deploying some category pages are getting the wrong css, returning 404, I tried flushing the cache but it didn't work.

Magento2 static content css 404

How could I solve it?

1

It was happening because the HTML has been cached by Varnish, so the browser was getting the old version getting the wrong CSS path.

You can access you host panel and flush the Varnish there, or you can run this command below if you have access.

sudo /etc/init.d/varnish restart
0

Seems like, you didn't remove the _cache folder. Please try to remove everything in the pub/static/ except the htacess. And deploy.

  • It doesn't make sense since we don't need to remove the _cache folder manually to deploy static files, but even removing it doesn't work. – Rafael Corrêa Gomes Nov 7 at 20:35
0

just delete everything from pub->static->frontend folder and flush cache. hope this will solve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.